Dynamic network representation learning method for node attribute storage
By constructing an inductive graph convolution model including LSTM layer, attention layer and fully connected layer, combined with partial sampling technology, the problem that existing methods are difficult to integrate node attributes and topological structures in time-include social networks is solved, and more accurate node representation and social network analysis are achieved.
Patent Information
- Application Number
- CN202510853996.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-07-22
- 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.
The inductive graph convolution model is adopted, and the aggregation convolution module of the LSTM layer, attention layer and fully connected layer is combined with partial sampling technology to aggregate neighbor node attribute vectors layer by layer, generate embedded vectors of target nodes, fuse multi-order neighbor information and train the model to improve accuracy.
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 CN120354884A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and particularly to a dynamic network representation learning method for node attribute preservation. Background Art
[0002] With the rapid development of social network and artificial intelligence technologies, network representation learning (also known as network embedding) has emerged as a key technology to solve the problems of social network analysis. By transforming the graph structure of a social network into a low-dimensional and dense vector representation, this technology can not only efficiently store large-scale network data, but also enable the node embedding vectors to meet the requirements of machine learning algorithms for sample independence, thus achieving remarkable results in static network analysis tasks such as node classification and link prediction. However, most traditional network representation learning methods are designed for static networks, only focusing on the network snapshot structure at a certain moment and ignoring the dynamic evolution characteristics of social networks over time. In reality, the dynamic nature of social member interactions causes the network structure and node relationships to continuously change. Traditional methods are difficult to accurately capture the evolution laws and internal characteristics of the network from the time dimension, resulting in limitations in information loss in the analysis of time-dependent social networks.
[0003] However, existing time-dependent social network representation learning methods still have obvious defects. On the one hand, the mainstream framework relies on dividing the time-dependent network into subgraph snapshots with fixed time intervals. This approach faces the problem of difficult to reasonably determine the time interval - too small an interval will increase the computational burden, and too large an interval will result in loss of dynamic information; at the same time, the mode of separately performing graph convolutional neural network (GCN) learning on a series of snapshots leads to high computational complexity and requires nodes to continuously exist in all snapshots, which does not conform to the scenario where nodes frequently join or leave the network in reality. On the other hand, inductive learning models (such as GraphSAGE) designed for static networks also have deficiencies in dynamic network applications. The unordered aggregators they adopt cannot capture the time order of node interactions, and the unbiased sampling method also fails to utilize historical interaction information to quantify the strength of node relationships, making it difficult to meet the analysis requirements of time-dependent networks for dynamics and temporal characteristics. These problems make it difficult for traditional methods to effectively integrate node attribute information and dynamic topological structures when dealing with time-dependent social networks, resulting in limitations in the accuracy and efficiency of representation learning results and affecting 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 includes: Obtain a time-dependent social network sample; the time-dependent social network sample includes nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent the interaction relationships that occurred between users at historical moments, and each row in the attribute matrix represents the attribute vector of a user; Construct an inductive graph convolutional model; the inductive graph convolutional model includes a number of aggregation convolutional modules; each of the aggregation convolutional modules includes an LSTM layer, an attention layer, and a fully connected layer; Determine the sampling order of the neighbor nodes of the target node in the time-dependent social network sample according to the number of aggregation convolutional modules of the inductive graph convolutional model, and perform biased sampling layer by layer from the highest order of the sampling order downward according to the chronological order of the interaction time between the neighbor nodes and the target node, to obtain the sampling node set and neighbor sequence queue for each layer; the sampling node set includes the nodes involved in the convolutional calculation in the corresponding aggregation convolutional 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 nodes of the previous layer; Through a number of aggregation convolutional modules, aggregate the attribute vectors of the neighbor nodes of the corresponding order layer by layer according to the sampling node set and neighbor sequence queue for each layer, and use the node representation vector output by the last aggregation convolutional module as the embedding vector of the target node; Train the inductive graph convolutional model according to the time-dependent social network sample and a pre-set loss function to obtain a trained inductive graph convolutional model, and use the trained inductive graph convolutional model for representation learning to complete the social network analysis task.
[0006] A dynamic network representation learning device for preserving node attributes, the device includes: A sample acquisition module, used to obtain a time-dependent social network sample; the time-dependent social network sample includes nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent the interaction relationships that occurred between users at historical moments, and each row in the attribute matrix represents the attribute vector of a user; A model construction module, used to construct an inductive graph convolutional model; the inductive graph convolutional model includes a number of aggregation convolutional modules; each of the aggregation convolutional modules includes an LSTM layer, an attention layer, and a fully connected layer; A biased sampling module, which is used to determine the neighbor node sampling order of the target node in the time-dependent social network sample according to the number of aggregation convolution modules of the inductive graph convolution model, and perform biased sampling layer by layer from the highest order of the sampling order downward according to the chronological order of the interaction time between the neighbor nodes and the target node, so as to obtain the sampling node set and neighbor sequence queue of each layer; 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 nodes of the previous layer; A node embedding module, which is used to pass through aggregation convolution modules, and according to the sampling node set and neighbor sequence queue of each layer, layer by layer aggregate the attribute vectors of the neighbor nodes of the corresponding order, and use the node representation vector output by the last aggregation convolution module as the embedding vector of the target node; A representation learning module, which is used to train the inductive graph convolution model according to the time-dependent social network sample and a pre-set loss function, 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.
[0007] A computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: Obtain a time-dependent social network sample; the time-dependent social network sample includes nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent the interaction relationships that occurred between users at historical moments, and each row in the attribute matrix represents the 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 neighbor node sampling order of the target node in the time-dependent social network sample according to the number of aggregation convolution modules of the inductive graph convolution model, and perform biased sampling layer by layer from the highest order of the sampling order downward according to the chronological order of the interaction time between the neighbor nodes and the target node, so as to obtain the sampling node set and neighbor sequence queue of each layer; 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 nodes of the previous layer; Through aggregation convolution modules, and according to the sampling node set and neighbor sequence queue of each layer, layer by layer aggregate the attribute vectors of the neighbor nodes of the corresponding order, and use the node representation vector output by the last aggregation convolution module as the embedding vector of the target node; Train the inductive graph convolutional model according to the time-dependent social network sample and a pre-set loss function to obtain a trained inductive graph convolutional model, and use the trained inductive graph convolutional model for representation learning to complete the social network analysis task.
[0008] A computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the following steps are implemented: Obtain a time-dependent social network sample; the time-dependent social network sample includes nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent the interaction relationships that occurred between users at historical moments, and each row in the attribute matrix represents the attribute vector of a user; Construct an inductive graph convolutional model; the inductive graph convolutional model includes aggregation convolutional modules; each aggregation module includes an LSTM layer, an attention layer, and a fully connected layer; Determine the sampling order of the neighbor nodes of the target node in the time-dependent social network sample according to the number of aggregation convolutional modules of the inductive graph convolutional model, and perform biased sampling layer by layer from the highest order of the sampling order downward according to the chronological order of the interaction time between the neighbor nodes and the target node to obtain the sampling node set and neighbor sequence queue for each layer; the sampling node set includes the nodes involved in the convolution calculation in the corresponding aggregation convolutional 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 nodes of the previous layer; Through aggregation convolutional modules, aggregate the attribute vectors of the neighbor nodes of the corresponding order layer by layer according to the sampling node set and neighbor sequence queue for each layer, and use the node representation vector output by the last aggregation convolutional module as the embedding vector of the target node; Train the inductive graph convolutional model according to the time-dependent social network sample and a pre-set loss function to obtain a trained inductive graph convolutional model, and use the trained inductive graph convolutional model for representation learning to complete the social network analysis task.
[0009] The above 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 a social network by obtaining time-dependent social network samples, providing basic data support for subsequent analysis. An inductive graph convolutional model with L aggregation convolutional modules is constructed. The sampling order is determined according to the number of aggregation convolutional modules in the model and biased sampling is performed to obtain a set of sampled nodes and a neighbor sequence queue, which can accurately define the node range involved in each layer of convolutional calculation, orderly provide a neighbor node sampling sequence, and create conditions for aggregating neighbor node attribute vectors layer by layer. By aggregating neighbor node attribute vectors layer by layer through L aggregation convolutional modules and using the output vector of the last module as the target node embedding vector, multi-order neighbor information can be fully integrated to obtain a more accurate node representation. The model is trained according to the time-dependent social network samples and the loss function to optimize the model parameters, enabling the model to comprehensively consider the dynamic topological structure of the network and node attribute information and learn more accurate node representations, thereby improving the accuracy of social network analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 FIG. is a schematic flowchart of a dynamic network representation learning method for node attribute preservation in an embodiment; Figure 2 FIG. is a schematic structural diagram of an IGCN model in an embodiment, where Figure 2 (a) is a schematic diagram of the BNS output result when the number of aggregation convolutional modules is 2, Figure 2 (b) is a schematic diagram of the IGCN model when the number of aggregation convolutional modules is 2; Figure 3 FIG. is a schematic framework diagram of the ATNE method in an embodiment; Figure 4 FIG. is a schematic diagram of an example of constructing a neighbor node time series in an embodiment, where Figure 4 (a) is a schematic diagram of the time series network structure, Figure 4 (b) is a schematic diagram of the neighbor node time series; Figure 5 FIG. is a structural diagram of an LSTM neuron in an embodiment; Figure 6 FIG. is a structural block diagram of a dynamic network representation learning device for node attribute preservation in an embodiment; Figure 7 FIG. is an internal structural diagram of a computer device in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0011] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0012] In one embodiment, as Figure 1 shown, a dynamic network representation learning method for node attribute preservation is provided, including the following steps: Step 102, obtaining a time-dependent social network sample.
[0013] The time-dependent social network sample includes nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent the interaction relationships that occurred between users at historical moments, and each row in the attribute matrix represents the attribute vector of a user. A time-dependent social network with node attributes is defined as , where is the set of nodes, is the set of timestamped edges. represents that nodes and node had an interaction at time . There may be multiple edges with different timestamps between two nodes in the time-dependent social network, that is, the time-dependent social network corresponds to a multi-graph. is the attribute matrix of the nodes of network , where the th row is the attribute vector corresponding to node . Taking the co-author network as an example, the nodes in the co-author network are authors, the node labels are determined by the fields of the articles, the attribute feature vectors are constructed through the Bag-of-words model of the article titles, the edges in the co-author network represent the co-author relationships between authors, the co-author relationships correspond to the publication times of the articles, and two authors may co-publish multiple articles (such as collaborations in different years), so there are multiple edges with different timestamps.
[0014] Different from the representation learning that only considers the network topology structure, considering node attributes will be able to mine deeper node relationships and provide better data preprocessing for downstream network analysis tasks. It is assumed that the node attributes remain unchanged during the evolution of the time-dependent social network, and only the network topology structure changes. This assumption conforms to common situations in reality, such as the basic attributes of users in a friend relationship network, such as gender and region, generally remain unchanged, and the affiliated units and research fields of authors in a co-author network (DBLP network) also generally remain unchanged.
[0015] 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 distance between two vectors and in the mapping space preserve the distance between nodes and Structural and attribute similarity
[0016] Step 104, construct an inductive graph convolutional model
[0017] Node attributes provide richer semantic information for learning time-dependent social network representations. The proposed Attributed Temporal Network Embedding method (ATNE) for time-dependent network representation learning in this invention presents a graph convolutional neural network model applicable to time-dependent networks, which integrates node attribute information and time-dependent network dynamic topology information to learn more accurate network representations. The core of ATNE is to learn the representation of a node by aggregating the attributes of its neighbor nodes. A time-dependent social network records the interaction time between a 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 nodes of this interaction on the target node. Therefore, ATNE considers the interaction order between the target node and its neighbor nodes and uses an ordered LSTM as the aggregator of neighbor node attribute information. ATNE adopts an attention mechanism when aggregating neighbor information, which can discover neighbor nodes that are more important for the representation of the target node through learning and assign larger weight values to their attributes.
[0018] The inductive graph convolutional model includes aggregation convolutional modules; each aggregation convolutional module includes an LSTM layer, an attention layer, and a fully connected layer. As Figure 2 shown, a schematic diagram of the IGCN model structure is provided. It can be seen from the schematic diagram of the IGCN model with 2 aggregation convolutional modules shown in Figure 2 (b) that the IGCN is stacked by multiple convolutional layers. Determine how a node aggregates the attribute information of its neighbor nodes to generate a node representation. An layer consists of an LSTM layer, an Attention layer (attention layer), and a fully connected layer. Among them, the LSTM layer is mainly used for extracting time-series features of node interactions, the attention layer is used for mining neighbor nodes with the greatest correlation with the target node for information aggregation, and the fully connected layer is used for non-linear transformation of attribute information.
[0019] Step 106, determine the sampling order of the neighbor nodes of the target node in the time-dependent social network sample according to the number of aggregation convolutional modules of the inductive graph convolutional model, and perform biased sampling layer by layer downward from the highest order of the sampling order according to the sequence of interaction times between the neighbor nodes and the target node to obtain the sampling node set and neighbor sequence queue for each layer.
[0020] The set of sampling nodes 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 sequences of the sampling nodes in the previous layer.
[0021] As Figure 3 shown in the framework diagram of the ATNE method, where BNS (Biased Neighbor Sampling algorithm) is mainly used to sample the neighbor nodes of the target node to generate the 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 representation vector of the target node. ATNE first aggregates the neighbor node attributes of the node through the first convolutional layer to obtain the corresponding hidden representation vector , and then inputs the output of the first layer into the second convolutional layer to obtain the representation vector of the target node . Note that the three aggregation functions in the graph layer share parameters and are equivalent to the same function. Each aggregation function contains an LSTM layer, an attention layer, and a fully connected non-linear transformation layer. The input of each layer is an ordered sequence of node attributes, and its order is determined by the interaction sequence between the target node and its neighbor nodes. Through two-layer convolution operations, ATNE can aggregate the attribute information of the two-order neighbor nodes of the target node as its representation vector. as its representation vector.
[0022] Step 108, through aggregation convolution modules, according to the set of sampling nodes and the neighbor sequence queue of each layer, layer by layer aggregate the attribute vectors of the neighbor nodes of the corresponding order, and use the node representation vector output by the last aggregation convolution module as the embedding vector of the target node.
[0023] Step 110, train the inductive graph convolution model according to the time-dependent social network samples and the pre-set loss function to obtain the trained inductive graph convolution model, and use the trained inductive graph convolution model for representation learning to complete the social network analysis task.
[0024] Social network analysis tasks can be node classification, link prediction, community detection, influence analysis, and anomaly detection. Using the trained inductive graph convolutional model for representation learning is conducive to improving the accuracy of various social network analysis tasks. In the node classification task, it can more accurately capture the node attributes and network structure characteristics, improve the accuracy of classification, and reduce misclassification. In terms of link prediction, the model can mine potential connection relationships based on the learned node representation, improve the reliability of prediction, and help discover possible connections in the social network in the future. In community detection, with accurate node representation, it can more reasonably divide closely connected communities and clearly present the organizational structure of the social network. In influence analysis, the influence of nodes in information dissemination and other aspects can be accurately evaluated, providing a strong basis for marketing strategy formulation, public opinion guidance, etc. In the anomaly detection task, it can effectively identify nodes with abnormal attributes or connection patterns, enhance the ability to identify false accounts and malicious behaviors, and ensure the healthy and orderly operation of social networks.
[0025] 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 convolutional modules (such as 3 layers corresponding to 3rd-order neighbors), and sampling is performed downward from the highest order layer by layer. 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 nodes are processed through multiple aggregate convolutional modules (including LSTM, attention, and fully connected layers). The LSTM layer captures the time sequence of neighbor collaboration, the attention layer screens 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 author's research field is predicted through a classifier (such as Softmax). The classification accuracy is improved by combining node attributes (research content), dynamic cooperative relationships, and temporal features.
[0026] In the above dynamic network representation learning method for node attribute preservation, by obtaining time-dependent social network samples, key information such as nodes (users), edges (interaction relationships), and attribute matrices (user attribute vectors) in the social network can be fully grasped, providing basic data support for subsequent analysis. An inductive graph convolutional model containing L aggregation convolutional modules is constructed. The sampling order is determined according to the number of aggregation convolutional modules in the model and biased sampling is performed to obtain a sampling node set and a neighbor sequence queue, which can accurately define the node range involved in each layer of convolutional calculation, orderly provide the neighbor node sampling sequence, and create conditions for aggregating neighbor node attribute vectors layer by layer. By aggregating neighbor node attribute vectors layer by layer through L aggregation convolutional modules and using the output vector of the last module as the target node embedding vector, multi-order neighbor information can be fully integrated to obtain a more accurate node representation. The model is trained according to the time-dependent social network samples and the loss function to optimize the model parameters, enabling the model to comprehensively consider the dynamic topological structure of the network and node attribute information and learn a more accurate node representation, thereby improving the accuracy of social network analysis.
[0027] In one embodiment, biased sampling is performed layer by layer downward from the highest order of the sampling order according to the chronological order of the interaction time between neighbor nodes and the target node. The obtained sampling node set and neighbor sequence queue for each layer include: initializing the sampling node set of the th layer according to the target node set in the time-dependent social network sample , and initializing the sampling node set of the th layer according to the sampling node set of the th layer ; obtaining the preset sampling number and the neighbor node time series of each sampling node in the sampling node set ; the neighbor node time series is sorted according to the chronological order of the interaction time between the sampling node and the neighbor node of the sampling node; direct sampling or Hawkes point process sampling is selected according to the size relationship between the number of nodes in each neighbor node time series and the sampling number to obtain the neighbor node sampling sequence of each sampling node; adding the neighbor node sampling sequences of each sampling node to the neighbor sequence queue of the th layer in sequence ; the neighbor sequence queue provides neighbor sampling sequence information for the rd aggregation convolutional module; removing duplicates from the nodes in the neighbor node sampling sequence of each sampling node and incorporating the deduplicated nodes into the sampling node set to obtain the updated sampling node set ; the updated sampling node set provides the node range involved in convolutional calculation for the th aggregation convolutional module; in the rd Execute the above loop from layer to layer 1 until the biased sampling of layer 1 is completed, and then output the sampling node set and neighbor sequence queue from layer to layer 1. The sampling node set and neighbor sequence queue from layer to layer 1.
[0028] In this embodiment, Figure 4 Construct a schematic diagram of examples for the neighbor node time series, where Figure 4 (a) is a schematic diagram of the time series 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 neighbor node set defined in the static network, is 's neighbor nodes arranged in the order of their interaction time with . Assume , its interaction time with is , , its interaction time with is , and , then should be ranked in front of . Note that may contain duplicate nodes.
[0029] The number of samples that ATNE needs to set is , the length of the neighbor node time series of node is , and the neighbor node sampling sequence of BNS for the target node is . 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 realizes node representation learning through multiple convolutional layers. And for each additional convolutional layer, it means that one more order of neighbor nodes needs to be sampled for information aggregation. Therefore, BNS needs to have the ability of multi-layer sampling. Let be the sampling node set involved in the calculation of the th convolutional layer, be the queue composed of the neighbor sampling sequences of the nodes in . The BNS algorithm that supports batch sampling is implemented as follows: Algorithm 1 Pseudo-code for Biased Sampling of Neighbor Nodes (BNS) is as follows: Input: Temporal network , number of convolutional layers , sampling length , small batch node set . Output: , . 1: Assign the small batch node set to be characterized to : ; 2: for{ } do 3: ; 4: for{ } do 5: if{ } then 6: Let ; 7: else 8: Calculate the sampling probability of each neighbor node ; 9: Sample nodes from the sampling probability and splice them with to form ; 10: endif ; 11: Add to in order; 12: , where is used to remove duplicate nodes in ; 13: endfor 14: endfor 15: return , ,
[0030] In one embodiment, direct sampling or Hawkes point process sampling is selected according to the size relationship between the number of nodes and the sampling number in the time series of each neighbor node, and the neighbor node sampling sequence of each sampled node is obtained as follows: If the number of nodes in the time series of the current neighbor node is greater than or equal to the sampling number, direct sampling is performed. The steps of direct sampling include: Select the last neighbor nodes in the time series of the neighbor node to obtain the neighbor node sampling sequence of the current sampled node, where is the sampling number.
[0031] In this embodiment, when the first case , it indicates that 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 That's it. Because The The sequence of neighbor nodes that have interacted with each other meets the requirements of ATNE for aggregating neighbor node attribute information in time sequence. After the sequence nodes as the sampling result, because in The later the node is sorted, the The closer the interaction time is to the current time, the lower the impact of an interaction on the strength of node relationships will be. In order to ensure the latest node representation, BNS takes the neighboring node closest to the current time as the sampling sequence.
[0032] In one embodiment, direct sampling or Hawkes point process sampling is selected according to the size 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, 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.
[0033] In this embodiment, the point process is generally used for discrete event sequence modeling, and it is assumed 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 conditional probability of occurrence at a given moment can be obtained by Under these conditions, an event occurs in a very small time window. The number of occurrences in is defined as: ; in Indicates that the event The number of times it occurs.
[0034] The conditional intensity function of Hawkes Process (HP) is defined as follows: ; where is the basic intensity of the occurrence of this event, indicating the self - probability of occurrence at time. is a kernel function, used to simulate the time - decay effect of the influence of past history on the current event. By adopting the exponential function as the kernel function of the Hawkes process. The conditional intensity function of the Hawkes process shows that the occurrence of the current event not only depends on the event in the last time step, but also is affected by historical events with a time - decay effect.
[0035] When , BNS samples neighbor nodes of , and splices them together with to form . Let be the set of neighbor nodes of node . The primary task of BNS is to determine the sampling probability of nodes in . The Hawkes process assumes that historical events have an accumulative effect on the occurrence of the current event, and the influence of a single historical event decays exponentially over time. This feature is very suitable for modeling node interaction events in social networks. Regarding an interaction between node and its neighbor node as an event, then can be regarded as the historical event sequence of node . For node , its conditional intensity function can be known from the multivariate Hawkes process as: ; where is the current time, is the time when node has this interaction with . is the basic intensity of a single interaction event occurring between node and node at the current time, represents the stimulative influence of the occurrence of historical event on . is a time - decay kernel function.
[0036] In the Hawkes process, the basic intensity reflects the natural affinity between node and . Similar to the literature, BNS adopts node and Characteristic attribute vector and The negative Euclidean distance of is used as a similarity measure to characterize the natural affinity between and , that is . Similarly, . In addition, BNS adopts an exponential decay model as the kernel function. Then the conditional intensity function of node interacting with at the current time can be rewritten as: ;
[0037] Also, since the conditional probability intensity obtained from the above formula is negative, it is necessary to perform an exponential mapping on to make its value positive. Finally, the calculation formula of is as follows: ; After obtaining the conditional intensity function of with respect to , according to the Hawkes Process, the probability that node interacts with at the current time and is: ; After obtaining the sampling probability of all neighbor nodes of , BNS only needs to sample from according to the corresponding sampling probability neighbor nodes of .
[0038] In one embodiment, the sampling probability is: ; where is the probability that node interacts with node at the current time, , is the set of neighbor nodes of node , is the conditional intensity function of node interacting with and at the current time represents any one of the neighbor nodes in
[0039] In one embodiment, through An aggregation convolution module, according to the sampling node set and neighbor sequence queue of each layer, aggregates the neighbor node attribute vectors of the corresponding order layer by layer, including: obtaining the neighbor sequence queue and the updated sampling node set , where ; in the th aggregation convolution module, the neighbor node sampling sequences of each sampling node in the neighbor sequence queue are processed through an LSTM layer to obtain the hidden state sequences of each sampling node, and the neighbor representation vectors of each sampling node are obtained by weighted aggregation of the hidden state sequences of each sampling node through an attention layer. The neighbor representation vectors of each sampling node are concatenated with the representation vectors of the sampling node itself at the th layer, and the concatenated vectors are input into a fully connected layer for non-linear transformation to obtain the representation vectors of each sampling node at the th layer.
[0040] In this embodiment, IGCN generates node representations by aggregating neighbor node attribute information. Specifically, IGCN considers the time characteristics of the time-dependent network during the process of aggregating neighbor node attribute information, aggregates information in an ordered manner, and learns more important neighbor nodes through an attention mechanism for information aggregation. Figure 2 Fig. shows an IGCN model structure including two convolutional layers. The process of IGCN generating node representations will be specifically explained below with reference to the example shown in the figure.
[0041] Figure 2 (a) is a schematic diagram of the BNS output result when the number of aggregation convolution modules is 2, showing the process of IGCN generating node representations . Of course, IGCN needs to aggregate information according to the BNS sampling results. As can be seen from the figure, the sampling layer number of BNS , the number of sampled neighbor nodes of each node , so BNS outputs three sampling node sets and two neighbor sampling sequence lists . As can be seen from the figure, the 0th layer representation of each node in is the feature attribute vector of the node of the first layer of IGCN is used to generate the 1st layer representation of each node in . Taking the generation of as an example. is first input into the LSTM layer to obtain . Then The input to the attention layer obtains the ordered neighbor attribute aggregation representation of the node . Finally, is concatenated with the 0th layer representation of and then input to the fully connected layer for a non-linear transformation to obtain the first layer representation vector of . After layers, the first layer representation vectors of all nodes in can be obtained . Then the layer obtains the second layer representation vector of the node in through a similar operation, which is used as the final representation vector of and output. Through the above two layers of convolution, IGCN can orderly aggregate the two-order neighbor node attribute information of .
[0042] Given a batch of node sets that need to generate representations, BNS samples to generate multiple sampled node sets and a sampled neighbor sequence list . The process of IGCN batch generating node representations is shown in Algorithm 2. Among them, is the th queue in the list, and , , , respectively represent the attention layer and the LSTM layer of the convolutional layer.
[0043] The pseudo-code for batch node representation generation in Algorithm 2 is as follows: Input: Number of convolutional layers , mini-batch node set , node features . Output: Node representations . 1: Assign the node feature attributes to the 0th layer representation vector of the node, i.e.: ; 2: for { } do 3: for { } do 4: Aggregate the neighbor attributes of node : ; 5: Layer Neighbor Aggregation Information and the attributes of the layer node itself are concatenated and input into the fully connected layer for non-linear transformation: ; 6: endfor 7: endfor 8: return Use the representation vector of the layer as the node representation output: . Long Short-Term Memory (LSTM) is a special structure of recurrent neural network, which can learn the long-term dependencies of sequence data and effectively solve the problems of gradient vanishing and gradient explosion during training. LSTM is used as an aggregator for neighbor node attribute information in IGCN to learn the temporal features of the interaction between the target node and neighbor nodes. The following specifically explains the forward propagation process of the contained in the convolutional layer. From the structure of IGCN, is mainly used to aggregate the representation vectors of neighbor nodes of the target node at the layer. Assume the target node is , and the sequence of representation vectors of its neighbor nodes at the layer is . For simplicity of description, the subscript used to represent the node number in is omitted when introducing LSTM below .
[0044] As Figure 5 shown in the LSTM neuron structure diagram, LSTM is stacked by multiple LSTM neurons. Compared with traditional RNN, LSTM introduces memory cells to memorize the historical information of the input sequence. In addition, LSTM introduces a gating mechanism to control the information transfer path. As Figure 5 shown, an LSTM neuron contains an input gate , a forget gate , and an output gate . Among them, the forget gate controls forgetting the memory cell of the previous step neuron , the input gate is used to control the information that needs to be memorized in the current step input, and the output gate is used to control the information transferred from the current memory cell to the next neuron.
[0045] It can be seen that a single LSTM neuron receives the memory cell of the previous step neuron , the activation state of the previous neural unit and the current-step information are used as inputs to update the memory unit according to the following formula and output the activation state of the current neural unit : ; ; where denotes element-wise multiplication of vectors, is the candidate state of the current memory unit. Its calculation formula is as follows:
[0046] Each gate needs to be updated according to the current-step input information. The specific update method is as follows:
[0047] The attention mechanism was first applied to the machine translation field of natural language processing. The key is to assign different weights to different words in a sequence for learning the representation of the entire sentence. By analogy with the process of aggregating the attribute information of neighbor nodes for the target node , the influence of the attribute information of different neighbor nodes on the representation of the target node may also be different. In order to further explore the neighbor node with the greatest influence, IGCN introduces the attention mechanism in the convolutional layer to assign different weights to the attribute information of different neighbor nodes and learn the representation of the target node. The specific implementation of the attention layer is as follows: For the target node and its neighbor nodes in the layer, after the sequence of representation vectors is input into the layer, the sequence of representation vectors in the layer can be obtained. First, calculate the hidden representation vector of each in
[0048] through a perceptron layer: ; where is the sequence context vector, which is randomly initialized and obtained through training.
[0049] Finally, aggregate the representations of neighbor nodes by weighted summation to generate : ; Obtain the target node The aggregation result of the neighbor nodes After that The last step for this layer is to combine of The layer representation vector and The neighbor aggregation vector of this layer , perform a non - linear transformation to obtain The representation result of this layer . The specific calculation method is as follows: .
[0050] In one embodiment, the loss function is: ; Wherein is the embedding vector obtained after the node is processed by the inductive graph convolution model, is the loss function value of the node , is the set of neighbor nodes obtained by a random walk of a fixed length starting from the node , is a node belonging to the set , is sampled from the -th order neighbor nodes of the node , is a node belonging to the set , represents the activation function, is the embedding vector obtained after the node is processed by the inductive graph convolution model, is the embedding vector obtained after the node is processed by the inductive graph convolution model, is the transpose operation.
[0051] In this embodiment, after determining the IGCN model, ILR is committed to training the IGCN model parameters to generate a time - aware network representation . ILR can train IGCN in an unsupervised or supervised manner, and the specific manner adopted can be determined according to the corresponding downstream tasks. This article mainly introduces the more general case, that is, using the ILR unsupervised training method to generate network representations. It is desired that similar nodes have similar representation vectors in the embedding space. Therefore, based on the network structure, the above - mentioned loss function is defined, where The size of 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 apart will be more different.
[0052] Specifically, given a time-varying network with attributes , the number of training rounds , the batch training size , the implementation of the ILR algorithm is shown in Algorithm 3 below: Algorithm 3 Inductive Representation Learning Algorithm Input: , the number of training rounds , the batch training size . Output: Network representation result . 1: for { } do 2: Randomly partition the nodes in into sets, where represents the -th set; 3: for { } do 4: Let ; 5: for { } do 6: Sample and and according to 7: ; 8: endfor 9: Use the BNS algorithm to perform biased sampling on the nodes in to obtain and ; 10: Use Algorithm 2 to generate the representation vectors of all nodes in ; 11: Calculate the batch loss function value and update the IGCN model parameters using the batch gradient descent algorithm; 12: endfor 13: endfor 14: Initialize ; 15: Orderly partition the nodes in into sets according to ; 16: for { } 17: Let ; 18: Use the BNS algorithm to perform biased sampling on the internal nodes to obtain and ; 19: Use Algorithm 4.2 to generate the representation vectors of all nodes within ; 20: Concatenate them in order to ; 21: endfor 22: Return the time-dependent network representation matrix . In a specific embodiment, the performance of each algorithm in node clustering applications is compared through experiments. Node clustering aims to cluster nodes according to the node feature distance without knowing the node labels, and its clustering results can usually be used as the basis for network community discovery. Similar to the link prediction experiment settings, first, unsupervised representation learning is performed on the network to obtain the representation matrix , then the representation vectors of the nodes are used as the feature vectors of the nodes to train a machine learning clustering model, and this model is used for node clustering. The clustering model used in this group of experiments is the K-means model. This group of experiments uses the DBLP network and the Reddit network with node labels as the experimental datasets, and the node labels are used as the benchmark class labels. Among them, the co-author network (DBLP network) contains 20,992 nodes, 237,720 edges, and 4 types of node labels. Among them, the nodes represent authors, and the edges represent a co-author relationship between two authors. Specifically, the articles included in this network are 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). The node labels are the research fields that the authors are concerned about, which are determined by the main fields to which the articles published by the authors belong. The node attribute feature vectors are constructed based on the titles of the articles published by the authors using the Bag-of-words model, and their dimension is set to 2000. The Reddit network is a hyperlink network of the Reddit website community. This network contains 22,858 nodes, 296,058 edges, and 3 different types of labels. Among them, the nodes represent a community on the Reddit website, and the edges represent an interaction between two communities. The node labels represent the sentiment classification of the community, which can be specifically divided into positive sentiment, negative sentiment, and neutral sentiment. The dimension of the node attribute feature vectors is 300.
[0053] For the DBLP network and the Reddit network, the K values of the clustering clusters of the K-means model are set to 4 and 3 respectively. In this group of experiments, the Normalized Mutual Information (NMI) is used as the evaluation index for clustering accuracy. Specifically, given the set of true class labels of nodes and the set of node class labels predicted by the algorithm , the definition of NMI is as follows: ; where is the entropy of the set , is the mutual information measure of the set and the set .
[0054] Table 1 MNI values of node clustering of each algorithm under the DBLP network and the Reddit network
[0055] The performance of the node clustering accuracy MNI of each algorithm in the Reddit network and the DBLP network is shown in Table 1. In Table 1, the maximum value of MNI is highlighted in bold. The comparison algorithms used can be divided into two categories: static network representation learning algorithms and dynamic network representation learning algorithms. Static comparison algorithms include the DeepWalk algorithm that does not consider node attributes and the GraphSAGE algorithm that considers node attributes. Dynamic comparison algorithms include algorithms that do not consider node attributes (E-LSTM-D, CTDNE, HNIP). From the experimental results in Table 1, the following conclusions can be drawn: The performance of ATNE in node clustering is still better than that of the other five groups of comparison algorithms, which once again proves the effectiveness of ATNE. In this group of experiments, K-Means is used as the clustering algorithm, which directly uses the distance of node representation vectors as the basis for clustering. The optimal performance of ATNE in this group of experiments indicates that ATNE can more effectively embed similar nodes in the network closer together. Similarly, the clustering accuracy of the representation learning method that considers node attribute information is better than that of the method that does not consider node attributes. For example, the NMI of GraphSAGE in the DBLP network is 0.298, while the NMI of DeepWalk is 0.214. Another example is that the NMI of ATNE in the DBLP network is 0.409, while the NMI of E-LSTM-D is 0.311. The performance of each algorithm in the DBLP network is still better than that in the Reddit network. This is because in this group of experiments, we use the class labels of nodes as the benchmark for clustering.
[0056] It should be understood that although Figure 1The steps in the flowchart are shown in sequence according to 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. Moreover, Figure 1 at least some of the steps in
[0057] In one embodiment, as Figure 6 shown, a dynamic network representation learning device for node attribute preservation is provided, including: A sample acquisition module 602, configured to acquire a time-dependent social network sample; the time-dependent social network sample includes nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent the interaction relationships that occurred between users at historical moments, and each row in the attribute matrix represents the attribute vector of a user; A model construction module 604, configured to construct an inductive graph convolutional model; the inductive graph convolutional model includes aggregation convolutional modules; each aggregation convolutional module includes an LSTM layer, an attention layer, and a fully connected layer; A biased sampling module 606, configured to determine the neighbor node sampling order of the target node in the time-dependent social network sample according to the number of aggregation convolutional modules of the inductive graph convolutional model, and perform biased sampling layer by layer from the highest order of the sampling order downward according to the chronological order of the interaction time between the neighbor nodes and the target node, to obtain the sampling node set and the neighbor sequence queue for each layer; the sampling node set includes the nodes involved in the convolutional calculation in the corresponding aggregation convolutional 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 nodes of the previous layer; A node embedding module 608, configured to pass through aggregation convolutional modules, and layer by layer aggregate the attribute vectors of the neighbor nodes of the corresponding order according to the sampling node set and the neighbor sequence queue for each layer, and use the node representation vector output by the last aggregation convolutional module as the embedding vector of the target node; A representation learning module 610, configured to train the inductive graph convolutional model according to the time-dependent social network sample and a pre-set loss function, to obtain a trained inductive graph convolutional model, and perform representation learning using the trained inductive graph convolutional model to complete the social network analysis task.
[0058] In one of the embodiments, it is further configured to initialize the first The set of sampling nodes of the layer , and according to the The set of sampling nodes of the layer Initialize the The set of sampling nodes of the layer ; Obtain the preset sampling number and the time series of neighbor nodes of each sampling node in the set of sampling nodes ; The time series of neighbor nodes is sorted in the order of the interaction time between the sampling node and its neighbor nodes; Select to perform direct sampling or Hawkes point process sampling according to the size relationship between the number of nodes in each neighbor node time series and the sampling number, and obtain the neighbor node sampling sequence of each sampling node; Add the neighbor node sampling sequences of each sampling node to the neighbor sequence queue of the layer in sequence ; The neighbor sequence queue provides neighbor sampling sequence information for the th aggregation convolution module; Remove duplicates from the nodes in the neighbor node sampling sequence of each sampling node, and incorporate the de-duplicated nodes into the set of sampling nodes to obtain the updated set of sampling nodes ; The updated set of sampling nodes provides the node range involved in convolution calculation for the th aggregation convolution module; Execute the above loop from the layer to the first layer until the biased sampling of the first layer is completed, and then output the set of sampling nodes and the neighbor sequence queue from the layer to the first layer.
[0059] In one embodiment, it is also used to perform direct sampling if the number of nodes in the current neighbor node time series is greater than or equal to the sampling number. The steps of direct sampling include: Select the last neighbor nodes in the neighbor node time series to obtain the neighbor node sampling sequence of the current sampling node, where is the sampling number.
[0060] In one embodiment, it is also used to perform Hawkes point process sampling if the number of nodes in the current neighbor node time series is less than the sampling number. The steps of Hawkes point process sampling include: Obtain 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 splice them with the current neighbor node time series to obtain the neighbor node sampling sequence of the current sampling node.
[0061] In one embodiment, the sampling probability is: ; where is the probability that node has an interaction event with node at the current time, , is the set of neighbor nodes of node , is the conditional intensity function of node having an interaction event with at the current time , and represents any one of the neighbor nodes in
[0062] In one embodiment, it is also used to obtain the neighbor sequence queue and the updated sampled node set , where ; in the th aggregation convolution module, the neighbor node sampling sequences of each sampled node in the neighbor sequence queue are processed through the LSTM layer to obtain the hidden state sequences of each sampled node. The hidden state sequences of each sampled node are weighted and aggregated through the attention layer to obtain the neighbor representation vectors of each sampled node. The neighbor representation vectors of each sampled node are concatenated with the th layer representation vector of the sampled node itself, and the concatenated vector is input into the fully connected layer for non-linear transformation to obtain the representation vectors of each sampled node in the th layer.
[0063] In one embodiment, the loss function is: ; where is the embedding vector obtained by processing node through the inductive graph convolution model, is the loss function value of node , is the set of neighbor nodes obtained by a random walk of a fixed length starting from node , is a node belonging to the set , is sampled from the th-order neighbor nodes of node , is a node belonging to the set , represents the activation function, is node The embedding vector obtained after being processed by the inductive graph convolutional model, is the node The embedding vector obtained after being processed by the inductive graph convolutional model, is the transpose operation.
[0064] For the specific limitations on the dynamic network representation learning device for node attribute preservation, reference can be made to the limitations on the dynamic network representation learning method for node attribute preservation in the above text, which will not be elaborated here. Each module in the above dynamic network representation learning device for node attribute preservation can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0065] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 7 shown. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, 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 through a network connection. When the computer program is executed by the processor, it implements a dynamic network representation learning method for node attribute preservation. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0066] Those skilled in the art can understand that Figure 7 the structure shown in
[0067] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0068] 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.
[0069] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing 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 methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0070] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope described in this specification.
[0071] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A dynamic network representation learning method for node attribute preservation, characterized in that The method includes: Obtaining a time-dependent social network sample; the time-dependent social network sample includes nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent the interaction relationships that occurred between users at historical moments, and each row in the attribute matrix represents the attribute vector of a user; Construct an inductive graph convolutional model; the inductive graph convolutional model includes aggregation convolutional modules; each of the aggregation convolutional modules includes an LSTM layer, an attention layer, and a fully connected layer; Determining the neighbor node sampling order of the target node in the time-dependent social network sample according to the number of aggregation convolution modules of the inductive graph convolution model, and performing biased sampling layer by layer downward from the highest order of the sampling order according to the chronological order of the interaction time between the neighbor nodes and the target node, to obtain the sampling node set and neighbor sequence queue for each layer; 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 nodes of the previous layer; Through aggregate convolutional modules, the attribute vectors of neighbor nodes of corresponding orders are aggregated layer by layer according to the set of sampled nodes and the neighbor sequence queue of each layer, and the node representation vector output by the last aggregate convolutional module is used as the embedding vector of the target node; Training the inductive graph convolution model according to the time-dependent social network sample and a preset loss function to obtain a trained inductive graph convolution model, and using the trained inductive graph convolution model for representation learning to complete the social network analysis task.
2. The method according to claim 1, characterized in that, The performing biased sampling layer by layer downward from the highest order of the sampling order according to the chronological order of the interaction time between the neighbor nodes and the target node to obtain the sampling node set and neighbor sequence queue for each layer includes: Initialize the set of sampled nodes for the th layer according to the set of target nodes in the time-dependent social network sample , and initialize the set of sampled nodes for the th layer according to the set of sampled nodes for the th layer ; initialize the set of sampled nodes for the th layer Obtain the preset number of samples and the set of sampling nodes The time series of neighbor nodes of each sampling node in ; the time series of neighbor nodes is sorted in the order of the interaction time between the sampling node and the neighbor node of the sampling node Selecting to perform direct sampling or Hawkes point process sampling according to the size relationship between the number of nodes in the time series of each neighbor node and the sampling number, to obtain the neighbor node sampling sequence of each sampling node; Add the neighbor node sampling sequences of each sampling node to the neighbor sequence queue of the th layer in sequence ; The neighbor sequence queue provides neighbor sampling sequence information for the th aggregation convolution module; Deduplicate the nodes in the neighbor node sampling sequences of each sampling node, and incorporate the deduplicated nodes into the sampling node set Obtain the updated sampling node set ; The updated sampling node set provides the node range involved in convolution calculation for the th aggregated convolution module; Execute the above loop from the layer to the first layer. When the biased sampling of the first layer is completed, output the sampling node sets and neighbor sequence queues from the layer to the first layer.
3. The method according to claim 2, wherein Selecting to perform direct sampling or Hawkes point process sampling according to the size relationship between the number of nodes in the time series of each neighbor node and the sampling number, to obtain the neighbor node sampling sequence of each sampling node includes: If the number of nodes in the time series of the current neighbor node is greater than or equal to the sampling number, then perform direct sampling, and the steps of the direct sampling include: Select the last neighbor nodes in the time series of neighbor nodes to obtain the sampling sequence of neighbor nodes of the current sampling node, where is the number of samplings.
4. The method according to claim 2, characterized in that, Selecting to perform direct sampling or Hawkes point process sampling according to the size relationship between the number of nodes in the time series of each neighbor node and the sampling number, to obtain the neighbor node sampling sequence of each sampling node includes: If the number of nodes in the time series of the current neighbor node is less than the sampling number, then perform Hawkes point process sampling, and the steps of the Hawkes point process sampling include: Obtain the difference between the number of nodes in the time series of the current neighbor nodes and the sampling number ; Calculate the sampling probability of each node in the time series of the current neighbor nodes according to the Hawkes point process, and supplement and sample the difference from the time series of the neighbor nodes according to the sampling probability, and splice it with the time series of the current neighbor nodes to obtain the neighbor node sampling sequence of the current sampled node.
5. The method according to claim 4, characterized in that The sampling probability is: ; Among them, is the node The probability of an interaction event occurring between the current time and the node is , is the node The set of neighbor nodes of is the node At the current time and The conditional intensity function of the interaction event occurring represents Any one of the neighbor nodes in 6. The method according to claim 1, characterized in that, Through aggregation convolution modules, according to the sampling node set and neighbor sequence queue of each layer, layer by layer aggregate the neighbor node attribute vectors of the corresponding order, including: Obtain the neighbor sequence queue and the updated set of sampled nodes , where ; At the th aggregation convolution module, the neighbor node sampling sequences of each sampling node in the neighbor sequence queue are processed through the LSTM layer to obtain the hidden state sequences of each sampling node. The hidden state sequences of each sampling node are weighted and aggregated through the attention layer to obtain the neighbor representation vectors of each sampling node. The neighbor representation vectors of each sampling node are concatenated with the th layer representation vector of the sampling node itself, and the concatenated vector is input into the fully connected layer for non-linear transformation to obtain the representation vectors of each sampling node at the th layer.
7. The method according to claim 1, characterized in that, The loss function is: ; Among them, is the node the embedding vector obtained after being processed by the inductive graph convolutional model, is the node the loss function value of, starting from the node is the set of neighbor nodes obtained by random walk with a fixed length, belongs to the set the node in, starting from the node of is sampled from the k-th order neighbor nodes, belongs to the set the node in, represents the activation function, is the node the embedding vector obtained after being processed by the inductive graph convolutional model, is the node the embedding vector obtained after being processed by the inductive graph convolutional model, is the transpose operation.
Citation Information
Patent Citations
Social network node classification method and system based on multi-channel graph convolutional network
CN114757271A
Cloud platform operation and maintenance time sequence knowledge graph reasoning method
CN117371482A
Graph convolutional neural network model training method, apparatus and device, and medium
CN117474072A
Personalized recommendation method fusing social relation and time semantics
CN118152444A
Multi-dimensional time series event prediction via convolutional neural network(s)
US20180260704A1