Dynamic representation learning method and device for multiple heterogeneous information networks
By decomposing the multiple heterogeneous information network into sub-graphs and using causal multiple contrast learning and multiple sub-element learning methods, the problem of the existing technology being unable to adapt to dynamic changes is solved, and a more accurate representation of the learning results is achieved.
Patent Information
- Application Number
- CN202411366314.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-28
AI Technical Summary
The existing representation learning methods for multiple heterogeneous information networks are mainly aimed at static networks, and cannot effectively adapt to the dynamic analysis of multiple heterogeneous information networks that change over time.
By decomposing the target network into multiple subgraphs according to the type of edges, and using causal multiple contrast learning and multiple sub-element learning methods, the invariance and variance characteristics of the network are captured respectively, and the dynamic representation learning results are obtained.
Improve the accuracy and effectiveness of representation learning of multiple heterogeneous information networks, and can more accurately capture the evolution of the network over time and provide support for deeper network analysis.
Smart Images

Figure CN119538021A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of graph representation learning technology, and in particular to a dynamic representation learning method and device for multiple heterogeneous information networks. Background Art
[0002] Graph representation learning, also known as graph network representation learning, graph embedding, etc., maps nodes in the network to a low-dimensional vector space, which not only retains the structure and attribute information between nodes, but also achieves efficient data compression. Graph network representation learning greatly promotes the efficiency of network analysis and data mining tasks, such as node classification, connection prediction, and community detection.
[0003] Heterogeneous information networks have multiple types of nodes and / or edges. Most nodes in heterogeneous information networks have variable relationships and interactions. Such heterogeneous information networks are called multi-heterogeneous information networks (MHIN). Multi-heterogeneous information networks usually change over time and the relationships between network nodes are complex. Representation learning needs to adapt to such changes and express complex relationships to ensure that the representation learning vector can reflect the current state of the network and more accurately capture the evolution of the network over time, thereby providing a basis for more in-depth network analysis. However, existing representation learning methods for multi-heterogeneous information networks are mainly aimed at static network analysis, and are insufficient for dynamic analysis of multi-heterogeneous information networks that change over time. Summary of the invention
[0004] In view of this, the present application provides a method and device for dynamic representation learning of multiple heterogeneous information networks, the main purpose of which is to solve the technical problem that traditional representation learning cannot adapt to multiple heterogeneous information networks that change over time.
[0005] According to a first aspect of the present invention, a dynamic representation learning method for multiple heterogeneous information networks is provided, the method comprising:
[0006] S1, at time t, according to the type of edges in the target network, decompose the target network into multiple subgraphs, wherein one subgraph contains one type of edge, and time t is any time starting from the initial time;
[0007] S2, for each of the subgraphs, performing causal multiple contrast learning to obtain a first learning result of the subgraph, and fusing the first learning results of each of the subgraphs to obtain a first learning result of the target network;
[0008] S3, for each of the subgraphs, performing multiple subgraph meta-learning to obtain a second learning result of the subgraph, fusing the second learning results of each of the subgraphs to obtain a second learning result of the target network, and fusing the second learning result of the target network with the first learning result to obtain a representation learning result of the target network at time t;
[0009] S4, repeating S1 to S3 at the next moment, updating the representation learning result of the target network until the target moment is reached, and obtaining the representation learning result of the target network at the target moment.
[0010] In some embodiments, for each of the subgraphs, causal multiple contrastive learning is performed to obtain a first learning result of the subgraph, including: for each of the subgraphs, the subgraphs at time t and time t-1 are obtained, and based on the subgraphs at time t and time t-1, the graph convolutional neural network is trained using causal multiple contrastive learning to obtain a first neural network model of the subgraph at time t; using the first neural network model at time t, representation learning is performed on the subgraph at time t to obtain the first learning result of the subgraph at time t.
[0011] In some embodiments, the graph convolutional neural network is trained based on the subgraph at time t and time t-1 using causal multiple contrastive learning to obtain a first neural network model of the subgraph at time t, including: using a causal model to generate a causal intervention generation graph at time t based on the subgraph at time t, and generating a causal intervention generation graph at time t-1 based on the subgraph at time t-1; using the subgraph at time t, the causal intervention generation graph at time t, the subgraph at time t-1, and the causal intervention generation graph at time t-1 as training samples to train the graph convolutional neural network model; during the training process, based on the output of the graph convolutional neural network model, the causal loss function and the contrast loss function are used to optimize the parameters of the graph convolutional neural network model, and after reaching the preset training end condition, the first neural network model at time t is obtained through training.
[0012] In some embodiments, the output of the first neural network model includes the representation learning result of the subgraph at time t, the representation learning result of the causal intervention generation graph at time t, the representation learning result of the subgraph at time t-1, and the representation learning result of the causal intervention generation graph at time t-1;
[0013] In the training process, based on the output of the graph convolutional neural network model, the parameters of the graph convolutional neural network model are optimized by using a causal loss function and a contrast loss function. After reaching the preset training end condition, the first neural network model at time t is trained, including: for the representation learning result of the subgraph at time t and the representation learning result of the causal intervention generation graph at time t, the causal loss function is used to calculate the first causal loss value; for the representation learning result of the subgraph at time t-1 and the representation learning result of the causal intervention generation graph at time t-1, the causal loss function is used to calculate the second causal loss value; for the representation learning result of the subgraph at time t and the representation learning result of the subgraph at time t-1, the contrast loss function is used to calculate the contrast loss value; based on the first causal loss value, the second causal loss value, and the contrast loss value, the loss value of the first neural network model is calculated; when the loss value of the first neural network model is lower than a preset threshold, and / or the number of iterations of the first neural network model reaches a preset threshold, the training is terminated to obtain the first neural network model at time t.
[0014] In some embodiments, for each of the subgraphs, multiple subgraph element learning is performed to obtain a second learning result of the subgraph, including: for each subgraph, a task set is generated at each moment from the initial moment to moment t to obtain multiple task sets, and based on the multiple task sets, multiple subgraph element learning is performed to obtain a second neural network model corresponding to each subgraph; the task set of the subgraph at moment t is input into the second neural network model to obtain the second learning result of the subgraph at moment t.
[0015] In some embodiments, for each subgraph, a task set is generated for each moment from the initial moment to the moment t, and multiple task sets are obtained, including: for each subgraph, for moment a, when moment a belongs to the initial moment to the moment t-1, sampling is performed from the subgraph at moment a to obtain a training set, and sampling is performed from the difference between the subgraph at moment a+1 and the subgraph at moment a to obtain a verification set, and the initial task set of the subgraph at moment a is obtained according to the training set and the verification set; when moment a is moment t, sampling is performed from the subgraph at moment t to obtain a training set, and the initial task set of the subgraph at moment t is obtained according to the training set; for each subgraph, the initial task set of the subgraph is randomly assigned to the initial task sets of other subgraphs at the same moment, and the final task set of each subgraph is obtained; wherein the training set and the verification set both include multiple node pairs and labels of the node pairs, and the labels of the node pairs are used to indicate whether the node pairs are connected.
[0016] In some embodiments, multiple sub-graph meta-learning is performed based on the multiple task sets to obtain a second neural network model corresponding to each sub-graph, including: for each sub-graph, for time a, when time a belongs to the initial time to time t-1, the training set of the sub-graph at time a is used to perform sub-graph meta-learning to obtain the meta-knowledge at time a, and the meta-knowledge is optimized using the training loss function, and at time a+1, the verification set of the sub-graph at time a is used to verify the meta-knowledge at time a, and the verification loss function is used to optimize the meta-knowledge; when time a is time t, the training set of the sub-graph at time t is used to perform sub-graph meta-learning to obtain the meta-knowledge at time t, and the second neural network model at time t is obtained based on the meta-knowledge at time t.
[0017] According to a second aspect of the present invention, there is provided a dynamic representation learning device for multiple heterogeneous information networks, the device comprising:
[0018] A subgraph decomposition module is used to execute S1: at time t, according to the type of edges in the target network, decomposing the target network into multiple subgraphs, wherein one subgraph contains one type of edge, and time t is any time starting from the initial time;
[0019] A first learning module is used to execute S2: for each of the subgraphs, perform causal multiple contrast learning to obtain a first learning result of the subgraph, and fuse the first learning results of each of the subgraphs to obtain a first learning result of the target network;
[0020] A second learning module is used to execute S3: for each of the subgraphs, perform multiple subgraph meta-learning to obtain a second learning result of the subgraph, fuse the second learning results of each of the subgraphs to obtain a second learning result of the target network, and fuse the second learning result of the target network with the first learning result to obtain a representation learning result of the target network at time t;
[0021] An updating module is used to execute S4: repeat S1 to S3 at the next moment, update the representation learning result of the target network, until the target moment is reached, and obtain the representation learning result of the target network at the target moment.
[0022] According to a third aspect of the present invention, there is provided a storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned dynamic representation learning method for multiple heterogeneous information networks.
[0023] According to a fourth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned dynamic representation learning method for multiple heterogeneous information networks when executing the program.
[0024] The present invention provides a dynamic representation learning method and device for multiple heterogeneous information networks. First, at time t, according to the type of edges in the target network, the target network is decomposed into multiple subgraphs, wherein one subgraph contains one type of edges, and time t is any time starting from the initial time; then, for each of the subgraphs, causal multiple contrast learning is performed to obtain a first learning result of the subgraph, and the first learning result of each of the subgraphs is fused to obtain a first learning result of the target network; and, for each of the subgraphs, multiple subgraph meta-learning is performed to obtain a second learning result of the subgraph, the second learning result of each of the subgraphs is fused to obtain a second learning result of the target network, and the second learning result of the target network is fused with the first learning result to obtain a representation learning result of the target network at time t; finally, the above steps are repeated at the next time to update the representation learning result of the target network until the target time is reached, and the representation learning result of the target network at the target time is obtained. This application divides the target network into multiple subgraphs according to the type of edge, so that the information carried by each edge between two nodes in the target network can be fully utilized; the first representation learning result of the target network is obtained by adopting causal multiple contrast learning to capture the invariant characteristics of the target network in dynamic changes; the second representation learning result of the target network is obtained by adopting multiple subgraph meta-learning to extract meta-knowledge in the changes of the target network; the first representation learning result and the second representation learning result are merged to obtain the final representation learning result of the target network at the current moment, thereby improving the accuracy and effectiveness of representation learning. As time changes, the data of the target network is continuously updated, and steps S1 to S3 are repeated at each moment until the target moment is reached, and the final representation learning result of the target network at the target moment is obtained. In this way, effective representation learning of dynamic multiple heterogeneous information networks can be achieved, and accurate representation learning results can be provided for downstream tasks, greatly improving the accuracy of tasks such as classification and recommendation.
[0025] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0027] Figure 1 A schematic diagram of a flow chart of a dynamic representation learning method for multiple heterogeneous information networks provided by an embodiment of the present invention is shown;
[0028] Figure 2 A schematic diagram of subgraph decomposition provided by an embodiment of the present invention is shown;
[0029] Figure 3 A schematic diagram of a training architecture of a first neural network model provided by an embodiment of the present invention is shown;
[0030] Figure 4 A schematic diagram of a training process of a first neural network model provided by an embodiment of the present invention is shown;
[0031] Figure 5 A schematic diagram of a process for generating a task set of a subgraph at time t provided by an embodiment of the present invention is shown;
[0032] Figure 6 A schematic diagram of a multiple subgraph learning architecture of the same subgraph at different times provided by an embodiment of the present invention is shown;
[0033] Figure 7 A schematic diagram of an architecture for obtaining a second learning result of a target network based on second learning results of multiple subgraphs at the same time provided by an embodiment of the present invention is shown;
[0034] Figure 8 A schematic diagram of a process of obtaining a second learning result through multiple sub-graph element learning provided by an embodiment of the present invention is shown;
[0035] Fig. 9 A schematic diagram showing the structure of a dynamic representation learning device for multiple heterogeneous information networks provided by an embodiment of the present invention is shown;
[0036] Fig.10 A structural schematic diagram of another dynamic representation learning device for multiple heterogeneous information networks provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0037] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, in the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. In the various embodiments shown below, the first, second and various digital numbers are only used to distinguish for the convenience of description and are not used to limit the scope of the embodiments of the present application.
[0038] In the real world, complex network structures such as social networks, recommendation systems, and biological networks not only contain multiple types of entities and relationships, but also have rich attribute information. In order to effectively process and understand network information, network representation learning has become a research hotspot. Graph representation learning, also known as graph network representation learning, graph embedding, etc., maps nodes in the network to a low-dimensional vector space, which not only retains the structure and attribute information between nodes, but also achieves efficient data compression. Graph network representation learning has greatly promoted the efficiency of network analysis and data mining tasks, such as node classification, connection prediction, and community detection.
[0039] Heterogeneous networks have multiple types of nodes and / or edges, and there have been a lot of work on representation learning for heterogeneous networks, such as HNE (Heterogeneous Network Representation), metapath2vec (metapath Embedding), and Het GNN (Heterogeneous Graph Neural Networkwor). Most of this work requires the construction of reliable meta-paths to guide the model to achieve the representation of heterogeneous networks, that is, the construction of meta-paths requires certain prior knowledge. For example, HAN (Heterogeneous Graph Attention Network) aggregates neighborhood features hierarchically. The model is based on meta-paths, fully considers the importance of nodes and meta-paths, learns importance from the node level and semantic level, and generates node embeddings; MAGNN (Metapath Aggregated Graph Neural Network) represents heterogeneous networks through GNNs that can aggregate meta-paths; PF-HIN (Pre-Training for Heterogeneous Information Networks) is a pre-training and fine-tuning framework to learn the features of heterogeneous information networks; CoNR (Collaborative Neural Rendering) can simultaneously learn node and relationship representations for connection prediction; M-DHIN (Dynamic Heterogeneous Information Networks via Metagraphs) describes the features of the initial heterogeneous network through meta-graphs, and adopts a complex embedding scheme to better distinguish symmetric and asymmetric meta-graphs to explore the evolution of dynamic heterogeneous networks.
[0040] In addition, most networks in the real world are diverse, that is, the nodes in these networks have variable relationships and interactions, so they are called multiple heterogeneous information networks. For multiple heterogeneous information networks, PMNE (Principled Multilayer Network Embedding) proposes three multiplexed network embedding methods; MNE (Multilayer Network Embedding) proposes a two-dimensional embedding for each node in the network to aggregate information about different types of relationships while retaining their unique properties; MVN2vec (Multi-View Network Embedding) obtains node embedding by identifying two features of multiple network edges; HDGI (Heterogeneous Deep Graph Infomax) is a self-supervised model that integrates meta-path embedding.
[0041] For dynamic multiple heterogeneous information networks, dynamics is a major challenge when dealing with dynamic representation learning of multiple heterogeneous information networks, because multiple heterogeneous information networks include multiple types of nodes and different edges, and also contain attributes that change over time. Dynamics means that the structures of multiple networks change continuously over time, and representation learning must adapt to these changes to ensure that the representation learning vectors can reflect the current state of the multiple heterogeneous information networks. Existing multiple heterogeneous network representation learning methods are all aimed at static networks, but these methods may not be effective enough when dealing with multiple heterogeneous information networks that change over time.
[0042] Based on the above problems, the embodiment of the present application provides a dynamic representation learning method for multiple heterogeneous information networks, which realizes the effectiveness of dynamic representation learning for multiple heterogeneous information networks and can more accurately capture the evolution of the network over time, thereby providing deeper insights for network analysis. It can not only optimize existing network analysis tasks, such as node classification and connection prediction, but also provide support for new application scenarios, such as real-time recommendation systems, dynamic community detection, etc. In one embodiment, Figure 1 As shown, the method comprises the following steps:
[0043] S1. At time t, according to the type of edges in the target network, the target network is decomposed into multiple subgraphs, wherein one subgraph contains one type of edge, and time t is any time starting from the initial time.
[0044] The structural information of multiple heterogeneous information networks usually changes over time. In this embodiment, a dynamic representation learning method is used to learn the dynamic change process of multiple heterogeneous information networks. Specifically, from the initial moment when the multiple heterogeneous information network to be learned (hereinafter referred to as the target network) begins to change to the target moment when the learning ends, the time between the initial moment and the target moment is divided into multiple moments according to a preset time interval, and the multiple heterogeneous information network is represented and learned at each moment. Among them, the target moment can be set according to actual needs, for example, the xxth second or xxth minute is set as the target moment; for the target network that needs to be represented and learned in real time, the target moment can also be the current moment, that is, the latest moment when the target network changes.
[0045] In this embodiment, for the convenience of description, any moment starting from the initial moment is recorded as moment t, and the process of dynamic representation learning is described with reference to moment t. Multiple heterogeneous information networks contain multiple nodes and multiple edges. Two nodes can be connected by edges, and the same pair of nodes can be connected by multiple types of edges. In order to make full use of the information carried by each edge, starting from the initial moment, for any moment, the target network is divided into multiple subgraphs according to the type of edge in the target network, so that each subgraph contains one type of edge. In an example, Figure 2 As shown, Figure 2 After the target network with three types of edges shown on the left is decomposed into subgraphs, three subgraphs on the right are obtained, each containing one type of edge. In the future, representation learning can be performed on a subgraph basis, so that the structural information in the target network can be fully learned and the accuracy of representation learning of the target network can be improved.
[0046] S2. For each of the subgraphs, perform causal multiple contrast learning to obtain a first learning result of the subgraph, and fuse the first learning results of each of the subgraphs to obtain a first learning result of the target network.
[0047] S3. For each of the subgraphs, multiple subgraph meta-learning is performed to obtain a second learning result of the subgraph, the second learning result of each of the subgraphs is fused to obtain a second learning result of the target network, and the second learning result of the target network is fused with the first learning result to obtain a representation learning result of the target network at time t.
[0048] In this embodiment, after the target network is divided into multiple subgraphs, the target network is represented and learned in two directions based on the variability and invariance characteristics of the target network over time, taking the subgraphs as units.
[0049] In view of the invariance characteristics, causal multiple contrastive learning is adopted for each subgraph to obtain the first learning result of each subgraph, and the first learning results of each subgraph are fused to obtain the first learning result of the target network at time t. Among them, causal multiple contrastive learning is to train the graph neural network model (GCN, Graph Convolutional Networks) based on the causal model and contrastive learning to obtain the first neural network model, and then process the subgraph through the first neural network model to obtain the first learning result of the subgraph.
[0050] According to the variability characteristics, multiple subgraph meta-learning is performed on each subgraph to obtain the second representation learning result of each subgraph, and the second learning results of each subgraph are fused to obtain the second learning result of the target network at time t. Among them, multiple subgraph meta-learning is to learn multiple subgraphs through the meta-learning method, train to obtain the second neural network model, and then process the subgraph through the second neural network model to obtain the second learning result of the subgraph.
[0051] After obtaining the first learning result and the second learning result of the target network, the first learning result and the second learning result of the target network are fused to obtain the representation learning result of the target network at time t. The first learning result includes the invariance characteristics of the target network in the change over time, and the second learning structure includes the variability characteristics of the target network in the change over time. By learning the first learning result and the second learning result separately and then fusing them, the information of the target network can be fully learned, and the accuracy of dynamic representation learning of the target network can be improved.
[0052] S4. Repeat S1 to S3 at the next moment, update the representation learning result of the target network, until the target moment is reached, and obtain the representation learning result of the target network at the target moment.
[0053] In this embodiment, starting from the initial moment, dynamic representation learning is performed on the target network. After obtaining the representation learning result of the target network at the initial moment, the above steps S1 to S3 are repeated at the next moment to update the representation learning result of the target network, and so on until the target moment is reached to obtain the final representation learning result of the target network.
[0054] The present embodiment provides a dynamic representation learning method for multiple heterogeneous information networks. First, at time t, according to the type of edges in the target network, the target network is decomposed into multiple subgraphs, wherein one subgraph contains one type of edges, and time t is any time starting from the initial time; then, for each of the subgraphs, causal multiple contrast learning is performed to obtain a first learning result of the subgraph, and the first learning result of each of the subgraphs is fused to obtain a first learning result of the target network; and, for each of the subgraphs, multiple subgraph meta-learning is performed to obtain a second learning result of the subgraph, the second learning result of each of the subgraphs is fused to obtain a second learning result of the target network, and the second learning result of the target network is fused with the first learning result to obtain a representation learning result of the target network at time t; finally, the above steps are repeated at the next time to update the representation learning result of the target network until the target time is reached to obtain the representation learning result of the target network at the target time. This application divides the target network into multiple subgraphs according to the type of edge, so that the information carried by each edge between two nodes in the target network can be fully utilized; the first representation learning result of the target network is obtained by adopting causal multiple contrast learning to capture the invariant characteristics of the target network in dynamic changes; the second representation learning result of the target network is obtained by adopting multiple subgraph meta-learning to extract meta-knowledge in the changes of the target network; the first representation learning result and the second representation learning result are merged to obtain the final representation learning result of the target network at the current moment, thereby improving the accuracy and effectiveness of representation learning. As time changes, the data of the target network is continuously updated, and steps S1 to S3 are repeated at each moment until the target moment is reached, and the final representation learning result of the target network at the target moment is obtained. In this way, representation learning of dynamic multiple heterogeneous information networks can be achieved with high accuracy.
[0055] Furthermore, in order to fully illustrate the implementation process of this embodiment, the specific implementation methods of the above embodiment are refined and expanded below. Specifically, in one embodiment, for each of the subgraphs in step S2, causal multiple contrast learning is used to obtain the first learning result of the subgraph, which can be implemented in the following way: for each of the subgraphs, the subgraphs at time t and time t-1 are obtained, and based on the subgraphs at time t and time t-1, the graph convolutional neural network is trained using causal multiple contrast learning to obtain the first neural network model of the subgraph at time t; the first neural network model at time t is used to perform representation learning on the subgraph at time t to obtain the first learning result of the subgraph at time t.
[0056] In the above embodiment, for time t, causal multiple contrast learning is performed on the subgraph, and the graph neural network model needs to be trained using the subgraph at time t and the subgraph at time t-1, so as to obtain the first neural network model at time t, and then the subgraph at time t is processed by the first neural network model to obtain the first learning result of the subgraph at time t. The above processing is performed on each subgraph, and each subgraph corresponds to a first neural network model, so that the first learning result of each subgraph at time t can be obtained.
[0057] At the next moment (time t+1), similar to the steps at time t, the first neural network model is trained and updated again to obtain the first neural network model at time t-1, and the subgraph is processed based on the first neural network model at time t+1 to obtain the first learning result of the subgraph at time t+1.
[0058] In one embodiment, the graph convolutional neural network is trained based on the subgraphs at time t and time t-1 using causal multiple contrastive learning to obtain a first neural network model of the subgraph at time t. This can be specifically achieved in the following ways: using a causal model, based on the subgraph at time t, a causal intervention generation graph at time t is generated, and based on the subgraph at time t-1, a causal intervention generation graph at time t-1 is generated; using the subgraph at time t, the causal intervention generation graph at time t, the subgraph at time t-1, and the causal intervention generation graph at time t-1 as training samples, the graph convolutional neural network model is trained; during the training process, based on the output of the graph convolutional neural network model, the causal loss function and the contrast loss function are used to optimize the parameters of the graph convolutional neural network model, and after the preset training end conditions are met, the first neural network model at time t is obtained through training.
[0059] In the above embodiment, the specific training process of the first neural network model is as follows: Figure 3 and Figure 4 As shown, for time t, the subgraphs at time t and time t-1 are obtained, and the causal model is used to generate the causal intervention generation graph at time t based on the subgraph at time t, and the causal intervention generation graph at time t-1 is generated based on the subgraph at time t-1. The graph neural network model is trained based on the subgraph at time t, the causal intervention generation graph at time t, the subgraph at time t-1, and the causal intervention generation graph at time t-1. During the training process, the causal loss function and the contrast loss function are used to optimize the parameters based on the output results of the graph neural network model to obtain the first neural network model trained at time t.
[0060] In one embodiment, the output of the first neural network model includes the representation learning result of the subgraph at time t, the representation learning result of the causal intervention generation graph at time t, the representation learning result of the subgraph at time t-1, and the representation learning result of the causal intervention generation graph at time t-1; during the training process, based on the output of the graph convolutional neural network model, the parameters of the graph convolutional neural network model are optimized using a causal loss function and a contrast loss function, and after reaching a preset training end condition, the first neural network model at time t is obtained through training. Specifically, this can be achieved in the following way: for the representation learning result of the subgraph at time t and the representation learning result of the causal intervention generation graph at time t, the causal loss function is used A first causal loss value is calculated; for the representation learning result of the subgraph at time t-1 and the representation learning result of the causal intervention generation graph at time t-1, the second causal loss value is calculated using the causal loss function; for the representation learning result of the subgraph at time t and the representation learning result of the subgraph at time t-1, the contrast loss value is calculated using the contrast loss function; based on the first causal loss value, the second causal loss value, and the contrast loss value, the loss value of the first neural network model is calculated; when the loss value of the first neural network model is lower than a preset threshold, and / or the number of iterations of the first neural network model reaches a preset threshold, the training is terminated to obtain the first neural network model at time t.
[0061] In the above embodiment, during the training of the graph neural network model, the subgraph at time t, the causal intervention generation graph at time t, the subgraph at time t-1, and the causal intervention generation graph at time t-1 are processed by the graph neural network model, and a representation learning result (embedded vector) is generated for each of them. The loss function is calculated based on the representation learning result corresponding to each training sample, so as to optimize the parameters of the model. Specifically, the loss function includes a causal loss function and a contrast loss function.
[0062] Among them, the calculation formula of the causal loss function is as follows:
[0063]
[0064] In the above formula, L r is the causal loss function; α, β and γ are adjustable parameters used to characterize the weights; and is the i-th dimension of the embedding vector (learning result) corresponding to different training samples. A and B represent different training samples. For example, A and B can represent the subgraph at time t and the causal intervention generation graph at time t, respectively. represents the variance of the i-th dimension of the embedding vector of training sample A, Represents the variance of the i-th dimension of the embedding vector of training sample B; λ is an adjustable parameter, and Cov is the function for calculating the covariance.
[0065] The contrast loss function includes the local contrast loss function and the global contrast loss function. The formula of the local contrast loss function is as follows:
[0066]
[0067] The formula of the global contrast loss function is as follows:
[0068]
[0069] In the above two formulas, is a local contrast loss function, which is used to learn the local time-translation invariant features of nodes in the target network; is a global contrast loss function, which is used to learn the global time-translation invariant features of nodes in the target network; represents the embedding of node i in the subgraph at time t, represents the embedding of node i in the subgraph at time t-1, represents the embedding of node j in the subgraph at time t-1; N represents the number of nodes; represents the embedding of the neighbor nodes of node i in the subgraph at time t-1, Represents the embedding of the neighbor nodes of node j (which are not neighbor nodes of node i) in the subgraph at time t-1.
[0070] When calculating the loss value, the causal loss function is used to calculate the first causal loss value between the subgraph at time t and the learning result corresponding to the causal intervention generation graph at time t; the causal loss function is used to calculate the second causal loss value between the subgraph at time t-1 and the learning result corresponding to the causal intervention generation graph at time t-1; the contrast loss function is used to calculate the contrast loss value between the subgraph at time t and the learning result corresponding to the subgraph at time t-1. The first causal loss value, the second causal loss value and the contrast loss value are weighted and summed to calculate the loss value of the first neural network model.
[0071] The calculation formula for the loss value of the first neural network model is as follows:
[0072]
[0073] In the above formula, a is the weight, L r1 is the first causal loss value, L r2 is the second causal loss value.
[0074] When the loss value of the first neural network model reaches a preset threshold, and / or the number of iterations of model parameter optimization reaches a preset number, the training is completed to obtain the trained first neural network model at time t. After the first neural network model at time t is trained, the subgraph at time t is processed using the first neural network model to obtain the first learning result of the subgraph at time t. At each moment, the above steps are performed on each subgraph until the target moment is reached, and the first learning result of each subgraph at the target moment is obtained. The first learning results of each subgraph are fused to obtain the first learning result of the target network at the target moment.
[0075] In the above embodiment, a method combining causal model and contrastive learning is adopted to train the graph neural network model. The causal model is used to capture the causal variables in the target network. Combined with contrastive learning, the invariance characteristics of the target network over time can be fully and accurately learned, which helps to improve the accuracy of the final representation learning results of the target network.
[0076] In one embodiment, in step S3, for each of the subgraphs, multiple subgraph element learning is performed to obtain the second learning result of the subgraph, which can be specifically achieved in the following way: for each subgraph, a task set is generated at each moment from the initial moment to moment t to obtain multiple task sets, and based on the multiple task sets, multiple subgraph element learning is performed to obtain the second neural network model corresponding to each subgraph; the task set of the subgraph at moment t is input into the second neural network model to obtain the second learning result of the subgraph at moment t.
[0077] In the above embodiment, it is necessary to generate a task set for subgraph meta-learning. Taking time t as an example, for each subgraph, a task set is generated for each moment from the initial moment to time t, that is, each subgraph corresponds to t task sets at time t. Among them, the task set corresponding to the moment before time t is the source task set, and the task set corresponding to time t is the target task set. Subgraph meta-learning is performed based on the source task set and the target task set to obtain meta-knowledge, and the meta-knowledge is optimized, and a second neural network model is obtained based on the optimized meta-knowledge. Then, the target task set is processed by the second neural network model to obtain the second learning result of the subgraph at time t.
[0078] In one embodiment, for each subgraph, a task set is generated for each moment from the initial moment to the moment t, and a plurality of task sets are obtained. Specifically, this can be achieved in the following manner: for each subgraph, for moment a, when moment a belongs to the initial moment to the moment t-1, a training set is obtained by sampling from the subgraph at moment a, and a verification set is obtained by sampling from the difference between the subgraph at moment a+1 and the subgraph at moment a, and the initial task set of the subgraph at moment a is obtained according to the training set and the verification set; when moment a is moment t, a training set is obtained by sampling from the subgraph at moment t, and the initial task set of the subgraph at moment t is obtained according to the training set; for each subgraph, the initial task set of the subgraph is randomly assigned to the initial task sets of other subgraphs at the same moment, and the final task set of each subgraph is obtained; wherein the training set and the verification set both include a plurality of node pairs and labels of the node pairs, and the labels of the node pairs are used to indicate whether the node pairs are connected.
[0079] In the above embodiment, for each subgraph, a task set needs to be generated at each moment from the initial moment to moment t. For the sake of convenience, it is assumed that any moment from the initial moment to moment t is moment a, and the generation process of the task set of the subgraph at moment a is taken as an example for explanation.
[0080] If time a is any time between the initial time and time t-1 (that is, time a is not time t), then the training set is obtained by sampling from the subgraph at time a, and the validation set is obtained by sampling from the difference between the subgraph at time a+1 and the subgraph at time a. The initial task set of the subgraph at time a is obtained based on the training set and the validation set. Specifically, for the subgraph G at time a a , from G a A training set is collected from And from G a+1 -G a A validation set is collected from in For node pairs To represent the node and nodes Is the label connected? If connected, is 1, otherwise is 0.
[0081] If time a is time t, then a training set is obtained by sampling only from the subgraph at time a, and this training set is the initial task set of the subgraph at time t.
[0082] At the same moment, after collecting the initial task set for each subgraph, for each subgraph, randomly assign the task set of the subgraph to the task sets of other subgraphs at the same moment to obtain the final task set of each subgraph. In other words, the task sets are randomly assigned between subgraphs at the same moment, and the training samples between different subgraphs are fused, so that the model can learn the information of the mutual influence between different subgraphs during the training process, so that the trained model is more in line with reality, and the final learning results are more accurate.
[0083] In one embodiment, multiple sub-graph meta-learning is performed based on multiple task sets to obtain a second neural network model corresponding to each sub-graph, which can be specifically achieved in the following manner: for each sub-graph, for time a, when time a belongs to the initial time to time t-1, the training set of the sub-graph at time a is used to perform sub-graph meta-learning to obtain the meta-knowledge at time a, and the training loss function is used to optimize the meta-knowledge, and at time a+1, the verification set of the sub-graph at time a is used to verify the meta-knowledge at time a, and the verification loss function is used to optimize the meta-knowledge; when time a is time t, the training set of the sub-graph at time t is used to perform sub-graph meta-learning to obtain the meta-knowledge at time t, and the second neural network model at time t is obtained based on the meta-knowledge at time t.
[0084] In the above embodiment, multiple subgraph meta-learning is to perform meta-learning based on multiple (multiple) subgraphs. The process of obtaining the second neural network model through multiple subgraph meta-learning training is as follows: Figure 6 , Figure 7 as well as Figure 8 As shown, Figure 6 Schematic diagram of the second neural network model obtained by performing multiple sub-graph learning training on the same sub-graph at different times. Figure 7 Schematic diagram of the final learning results obtained by learning multiple sub-graphs for different sub-graphs at the same time.
[0085] like Figure 6 As shown, Figure 6 The meta-learning process of the subgraph from time t1 (initial time) to time t3 (t) is shown. The meta-learning process of the subgraph is also explained by taking time a as an example. If time a is any time from the initial time to time t-1, for example Figure 6 At time t1 in the graph, the subgraph uses G t1 To express it, through G t1 The training set is used to perform subgraph meta-learning to obtain the meta-knowledge at time t1, and the meta-parameter θ at time t1 is obtained based on the meta-knowledge at time t1. t1 , according to the meta-parameter θ t1Get the second neural network model at time t1, and get the output result Z of the second neural network model t1 Then from the subgraph G at time t2 t2 And the subgraph G at time t1 t1 The validation set is obtained from the graph, and the meta-parameter θt1 at time t1 is verified based on the validation set, and the meta-knowledge is optimized. Then, at time t2, the subgraph G t2 The training set is used to perform subgraph meta-learning, and the meta-knowledge at time t2 and the meta-parameter θ corresponding to the meta-knowledge at time t2 are obtained. t2 , and then get the second learning result Z of the subgraph at time t2 t2 , perform the same steps as above at other times, and so on, until reaching time t. If time a is time t, for example Figure 6 At time t3 in , only subgraph G is used t3 The training set is used to perform subgraph meta-learning to obtain the meta-knowledge at time t3, and the meta-parameter θ at time t3 is obtained based on the meta-knowledge at time t3. t3 , and then obtain the second neural network model at time t3, and then use the second neural network model at time t3 to calculate the subgraph G at time t3 t3 Processing is performed to obtain the second learning result Z of the subgraph at time t3 t3 .
[0086] The above steps are performed for each subgraph at time t, and each subgraph corresponds to a second neural network model, and accordingly each subgraph corresponds to a second learning result. Figure 7 As shown, Figure 7 Shows multiple subgraphs G at the same time s1 , G s2 …G sn The corresponding second representation learning results Z are obtained by the corresponding second neural network model respectively s1 , Z s2 …Z sn By formula The second representation learning results corresponding to each subgraph are fused to obtain the second learning result Z of the target network at time t, where Z in the formula is si is the subgraph G si The second learning result, b i is the weight.
[0087] In the above embodiment, during the training process of multiple sub-graph learning, the training loss function is used to update the model parameters of the second neural network model through the gradient descent method. The formula is as follows:
[0088]
[0089] in, is the meta-parameter of the kth iteration at time t, is the training loss function, and m is the learning rate. The calculation formula of the training loss function is:
[0090]
[0091] In the above formula, is the number of node pairs in the training set, is the second neural network model, and is a node in a node pair in the training set, is the label of the node pair in the training set, and σ is an adjustable parameter.
[0092] In the above embodiment, during the training process, the meta-knowledge is verified using the verification set of the source task, and the meta-parameters are updated by the verification loss function, and the formula is as follows:
[0093]
[0094] in, is the verification loss function, and n is the learning rate. The calculation formula for the verification loss function is:
[0095]
[0096] In the above formula, is the number of node pairs in the validation set, is the second neural network model, and is a node in a node pair in the training set, is the label of the node pair in the training set, and σ is an adjustable parameter.
[0097] Through the above formula, during the training process of multiple sub-graph learning, based on the characteristic that node labels tend to be invariant during the time period of dynamic changes in the target network, namely, local and global time translation invariance, the loss value is calculated in the representation learning process by maximizing the temporal consistency between local and / or global.
[0098] In the above embodiment, multiple subgraph meta-learning is used to extract the meta-knowledge of the target network in dynamic changes, and then learn the variability characteristics of the target network over time as the second learning result of the target network. The second learning result is merged with the first learning result to obtain the representation learning result of the target network at that moment. The above processing is performed on the target network at each moment, and the representation learning result of the target network is updated at each moment until the target moment is reached, and the final representation learning result of the target network at the target moment is obtained. The above method can improve the effectiveness and accuracy of dynamic representation learning of multiple heterogeneous information networks.
[0099] Further, as a specific implementation of the method shown in the above embodiment, this embodiment provides a dynamic representation learning device for multiple heterogeneous information networks, such as Fig. 9 As shown, the device includes: a subgraph decomposition module 31, a first learning module 32, a second learning module 33, and an updating module 34.
[0100] The subgraph decomposition module 31 may be used to execute S1: at time t, decomposing the target network into a plurality of subgraphs according to the type of edges in the target network, wherein one subgraph contains one type of edge, and time t is any time starting from the initial time;
[0101] The first learning module 32 may be used to execute S2: for each of the subgraphs, perform causal multiple contrast learning to obtain a first learning result of the subgraph, and fuse the first learning results of each of the subgraphs to obtain a first learning result of the target network;
[0102] The second learning module 33 may be used to execute S3: for each of the subgraphs, perform multiple subgraph meta-learning to obtain a second learning result of the subgraph, fuse the second learning result of each of the subgraphs to obtain a second learning result of the target network, and fuse the second learning result of the target network with the first learning result to obtain a representation learning result of the target network at time t;
[0103] The updating module 34 can be used to execute S4: repeat S1 to S3 at the next moment, update the representation learning result of the target network, until the target moment is reached, and obtain the representation learning result of the target network at the target moment.
[0104] In a specific application scenario, for each of the subgraphs, causal multiple contrastive learning is performed to obtain the first learning result of the subgraph. The first learning module 32 can be specifically used to obtain the subgraphs at time t and time t-1 for each of the subgraphs, and based on the subgraphs at time t and time t-1, the graph convolutional neural network is trained using causal multiple contrastive learning to obtain the first neural network model of the subgraph at time t; the first neural network model at time t is used to perform representation learning on the subgraph at time t to obtain the first learning result of the subgraph at time t.
[0105] In a specific application scenario, the graph convolutional neural network is trained based on the subgraph at time t and time t-1 using causal multiple contrastive learning to obtain a first neural network model of the subgraph at time t. The first learning module 32 can be specifically used to use a causal model to generate a causal intervention generation graph at time t based on the subgraph at time t, and to generate a causal intervention generation graph at time t-1 based on the subgraph at time t-1; the subgraph at time t, the causal intervention generation graph at time t, the subgraph at time t-1, and the causal intervention generation graph at time t-1 are used as training samples to train the graph convolutional neural network model; during the training process, based on the output of the graph convolutional neural network model, the causal loss function and the contrast loss function are used to optimize the parameters of the graph convolutional neural network model, and after the preset training end conditions are reached, the first neural network model at time t is obtained through training.
[0106] In a specific application scenario, the output of the first neural network model includes the representation learning result of the subgraph at time t, the representation learning result of the causal intervention generation graph at time t, the representation learning result of the subgraph at time t-1, and the representation learning result of the causal intervention generation graph at time t-1; during the training process, based on the output of the graph convolutional neural network model, the parameters of the graph convolutional neural network model are optimized using a causal loss function and a contrast loss function. After reaching a preset training end condition, the first neural network model at time t is obtained through training. The first learning module 32 can be specifically used for the representation learning result of the subgraph at time t and the representation learning result of the causal intervention generation graph at time t, using the causal loss function. A first causal loss value is calculated by using a loss function; a second causal loss value is calculated by using the causal loss function for the representation learning result of the subgraph at time t-1 and the representation learning result of the causal intervention generation graph at time t-1; a contrast loss value is calculated by using the contrast loss function for the representation learning result of the subgraph at time t and the representation learning result of the subgraph at time t-1; a loss value of the first neural network model is calculated based on the first causal loss value, the second causal loss value and the contrast loss value; when the loss value of the first neural network model is lower than a preset threshold value, and / or the number of iterations of the first neural network model reaches a preset threshold value, the training is terminated to obtain the first neural network model at time t.
[0107] In a specific application scenario, for each of the subgraphs, multiple subgraph element learning is performed to obtain the second learning result of the subgraph. The second learning module 33 can be specifically used to generate a task set for each subgraph at each moment from the initial moment to moment t, to obtain multiple task sets, and based on the multiple task sets, multiple subgraph element learning is performed to obtain a second neural network model corresponding to each subgraph; the task set of the subgraph at moment t is input into the second neural network model to obtain the second learning result of the subgraph at moment t.
[0108] In a specific application scenario, for each subgraph, a task set is generated for each moment from the initial moment to the moment t, and a plurality of the task sets are obtained. The second learning module 33 can be specifically used for each of the subgraphs. For moment a, when moment a belongs to the initial moment to the moment t-1, a training set is obtained by sampling from the subgraph at moment a, and a verification set is obtained by sampling from the difference between the subgraph at moment a+1 and the subgraph at moment a, and the initial task set of the subgraph at moment a is obtained according to the training set and the verification set; when moment a is moment t, a training set is obtained by sampling from the subgraph at moment t, and the initial task set of the subgraph at moment t is obtained according to the training set; for each subgraph, the initial task set of the subgraph is randomly assigned to the initial task sets of other subgraphs at the same moment, and the final task set of each subgraph is obtained; wherein the training set and the verification set both include multiple node pairs and labels of the node pairs, and the labels of the node pairs are used to indicate whether the node pairs are connected.
[0109] In a specific application scenario, multiple sub-graph meta-learning is performed based on multiple task sets to obtain a second neural network model corresponding to each sub-graph. The second learning module 33 can be specifically used for each sub-graph. For time a, when time a belongs to the initial time to time t-1, the training set of the sub-graph at time a is used to perform sub-graph meta-learning to obtain the meta-knowledge at time a, and the training loss function is used to optimize the meta-knowledge. At time a+1, the verification set of the sub-graph at time a is used to verify the meta-knowledge at time a, and the verification loss function is used to optimize the meta-knowledge. When time a is time t, the training set of the sub-graph at time t is used to perform sub-graph meta-learning to obtain the meta-knowledge at time t, and the second neural network model at time t is obtained based on the meta-knowledge at time t.
[0110] It should be noted that, for other corresponding descriptions of the functional units involved in the dynamic representation learning device for multiple heterogeneous information networks provided in this embodiment, reference can be made to the corresponding descriptions in the aforementioned embodiments, and no further details will be given here.
[0111] Based on the method shown in the above embodiment, correspondingly, this embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the dynamic representation learning method of multiple heterogeneous information networks shown in the above embodiment is implemented.
[0112] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product. The software product to be identified can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0113] Based on the above method as shown in the embodiment, and Fig. 9 In order to achieve the above-mentioned purpose, the embodiment of the dynamic representation learning device of multiple heterogeneous information networks shown in FIG. Fig.10 As shown, this embodiment also provides a computer device for dynamic representation learning of multiple heterogeneous information networks, which can specifically be a personal computer, a server, a smart phone, a tablet computer, a smart watch, or other network devices, etc. The computer device includes a storage medium and a processor; the storage medium is used to store computer programs and an operating system; the processor is used to execute the computer program to implement the method shown in the above embodiment.
[0114] Optionally, the computer device may further include an internal memory, a communication interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, a display, an input device such as a keyboard, etc. Optionally, the communication interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0115] Those skilled in the art will appreciate that the computer device structure for dynamic representation learning of multiple heterogeneous information networks provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0116] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the above-mentioned computer device hardware and the software resources to be identified, and supports the operation of the information processing program and other software and / or programs to be identified. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing computer device.
[0117] Through the description of the above implementation methods, the technical personnel in this field can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware. By applying the technical solution of the present application, the target network is divided into multiple subgraphs according to the type of edge, so that the information carried by each edge of the two nodes in the target network can be fully utilized; the first representation learning result of the target network is obtained by adopting causal multiple contrast learning to capture the invariant characteristics of the target network in dynamic changes; the second representation learning result of the target network is obtained by adopting multiple subgraph meta-learning to extract the meta-knowledge in the target network change; the first representation learning result and the second representation learning result are merged to obtain the final representation learning result of the target network at the current moment, thereby improving the accuracy and effectiveness of the representation learning. As time changes, the data of the target network is continuously updated, and steps S1 to S3 are repeatedly executed at each moment until the target moment is reached, and the final representation learning result of the target network at the target moment is obtained. Compared with the prior art, the representation learning of dynamic multiple heterogeneous information networks can be realized with high accuracy.
[0118] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.
[0119] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.
Claims
1. A dynamic representation learning method for multiple heterogeneous information networks, characterized in that: The method comprises: S1, at time t, according to the type of edges in the target network, decompose the target network into multiple subgraphs, wherein one subgraph contains one type of edge, and time t is any time starting from the initial time; S2, for each of the subgraphs, performing causal multiple contrast learning to obtain a first learning result of the subgraph, and fusing the first learning results of each of the subgraphs to obtain a first learning result of the target network; S3, for each of the subgraphs, performing multiple subgraph meta-learning to obtain a second learning result of the subgraph, fusing the second learning results of each of the subgraphs to obtain a second learning result of the target network, and fusing the second learning result of the target network with the first learning result to obtain a representation learning result of the target network at time t; S4, repeating S1 to S3 at the next moment, updating the representation learning result of the target network until the target moment is reached, and obtaining the representation learning result of the target network at the target moment.
2. The method according to claim 1, characterized in that: For each of the subgraphs, performing causal multiple contrast learning to obtain a first learning result of the subgraph includes: For each of the subgraphs, obtaining the subgraphs at time t and time t-1, and based on the subgraphs at time t and time t-1, training the graph convolutional neural network using causal multiple contrastive learning to obtain a first neural network model of the subgraph at time t; A first neural network model at time t is used to perform representation learning on the subgraph at time t to obtain a first learning result of the subgraph at time t.
3. The method according to claim 2, characterized in that The subgraph at time t and time t-1 is trained by using causal multiple contrast learning on the graph convolutional neural network to obtain a first neural network model of the subgraph at time t, including: Using a causal model, based on the subgraph at time t, a causal intervention generation graph at time t is generated, and based on the subgraph at time t-1, a causal intervention generation graph at time t-1 is generated; The subgraph at time t, the causal intervention generated graph at time t, the subgraph at time t-1, and the causal intervention generated graph at time t-1 are used as training samples to train the graph convolutional neural network model; During the training process, based on the output of the graph convolutional neural network model, the causal loss function and the contrast loss function are used to optimize the parameters of the graph convolutional neural network model. After reaching the preset training end conditions, the first neural network model at time t is obtained through training.
4. The method according to claim 3, characterized in that The output of the first neural network model includes the representation learning result of the subgraph at time t, the representation learning result of the causal intervention generation graph at time t, the representation learning result of the subgraph at time t-1, and the representation learning result of the causal intervention generation graph at time t-1; In the training process, based on the output of the graph convolutional neural network model, the parameters of the graph convolutional neural network model are optimized using a causal loss function and a contrast loss function. After reaching a preset training end condition, the first neural network model at time t is obtained through training, including: For the representation learning result of the subgraph at time t and the representation learning result of the causal intervention generation graph at time t, the causal loss function is used to calculate a first causal loss value; For the representation learning result of the subgraph at time t-1 and the representation learning result of the causal intervention generation graph at time t-1, the causal loss function is used to calculate a second causal loss value; For the representation learning result of the subgraph at time t and the representation learning result of the subgraph at time t-1, the contrast loss value is calculated using the contrast loss function; Based on the first causal loss value, the second causal loss value, and the contrast loss value, a loss value of the first neural network model is calculated; When the loss value of the first neural network model is lower than a preset threshold, and / or the number of iterations of the first neural network model reaches a preset threshold, the training is terminated to obtain the first neural network model at time t.
5. The method according to claim 1, characterized in that: For each of the subgraphs, performing multiple subgraph meta-learning to obtain a second learning result of the subgraph includes: For each subgraph, a task set is generated at each moment from the initial moment to the moment t, to obtain a plurality of the task sets, and multiple subgraph meta-learning is performed based on the plurality of the task sets to obtain a second neural network model corresponding to each subgraph; The task set of the subgraph at time t is input into the second neural network model to obtain a second learning result of the subgraph at time t.
6. The method according to claim 5, characterized in that For each subgraph, a task set is generated at each moment from the initial moment to the moment t, and a plurality of task sets are obtained, including: For each of the subgraphs, for time a, when time a belongs to the initial time to time t-1, sampling is performed from the subgraph at time a to obtain a training set, and sampling is performed from the difference between the subgraph at time a+1 and the subgraph at time a to obtain a validation set, and the initial task set of the subgraph at time a is obtained according to the training set and the validation set; When time a is time t, sampling is performed from the subgraph at time t to obtain a training set, and an initial task set of the subgraph at time t is obtained according to the training set; For each of the subgraphs, randomly assigning the initial task set of the subgraph to the initial task sets of other subgraphs at the same time to obtain the final task set of each subgraph; The training set and the validation set both include a plurality of node pairs and labels of the node pairs, and the labels of the node pairs are used to indicate whether the node pairs are connected.
7. The method according to claim 6, characterized in that The performing of multiple sub-graph meta-learning based on the plurality of task sets to obtain a second neural network model corresponding to each sub-graph includes: For each of the subgraphs, at time a, when time a belongs to the initial time to time t-1, the training set of the subgraph at time a is used to perform subgraph meta-learning to obtain meta-knowledge at time a, and the training loss function is used to optimize the meta-knowledge, and at time a+1, the verification set of the subgraph at time a is used to verify the meta-knowledge at time a, and the verification loss function is used to optimize the meta-knowledge; When time a is time t, the training set of the subgraph at time t is used to perform subgraph meta-learning to obtain meta-knowledge at time t, and the second neural network model at time t is obtained based on the meta-knowledge at time t.
8. A dynamic representation learning device for multiple heterogeneous information networks, characterized in that: The device comprises: A subgraph decomposition module is used to execute S1: at time t, according to the type of edges in the target network, decomposing the target network into multiple subgraphs, wherein one subgraph contains one type of edge, and time t is any time starting from the initial time; A first learning module is used to execute S2: for each of the subgraphs, perform causal multiple contrast learning to obtain a first learning result of the subgraph, and fuse the first learning results of each of the subgraphs to obtain a first learning result of the target network; A second learning module is used to execute S3: for each of the subgraphs, perform multiple subgraph meta-learning to obtain a second learning result of the subgraph, fuse the second learning results of each of the subgraphs to obtain a second learning result of the target network, and fuse the second learning result of the target network with the first learning result to obtain a representation learning result of the target network at time t; An updating module is used to execute S4: repeat S1 to S3 at the next moment, update the representation learning result of the target network, until the target moment is reached, and obtain the representation learning result of the target network at the target moment.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.