Feature pre-training and knowledge distillation combined time sequence diagram learning method

By combining the method of feature pre-training and knowledge distillation, the problem of difficulty in obtaining multi-level information and high computational cost in sequential graph learning is solved, the effective capture and fusion of high-order information is achieved, and the efficiency and performance of the model are improved.

CN118780346AInactive Publication Date: 2024-10-15HEILONGJIANG UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410733183.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-10-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing sequential graph learning methods have problems such as high computational cost and low efficiency when acquiring multi-level information. In particular, it is difficult to acquire high-order neighbor and community information, resulting in an insufficiently comprehensive receptive field of the model.

Method used

Using a method that combines feature pre-training and knowledge distillation, multi-level information is captured and distilled into the training process by introducing a pre-training module, using node2vec to generate pre-trained embeddings, and propagating them through the Hawkes process, community-level distribution and full-graph level Achieve multi-level refining and integration of information.

Benefits of technology

It effectively improves the model's ability to acquire and fuse multi-level information, improves the efficiency and performance of sequential graph learning, and significantly improves the performance of link prediction tasks on multiple data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780346A_ABST
    Figure CN118780346A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of information, particularly relates to a time sequence diagram learning method combining feature pre-training and knowledge distillation, and aims to solve the problem that the existing time sequence diagram method mainly focuses on low-order time information, and the calculation cost needs to be increased when higher-order neighbor or community information is acquired, so that the model efficiency is remarkably influenced. The invention provides a novel time sequence diagram learning method. According to the method, information in a time sequence diagram is divided into a time sequence level, a neighborhood level, a community level and a whole diagram level; in the training process, combining time sequence level information with first-order neighbors, namely time sequence level combination; for information of other levels, node2vec is used as a pre-training module to generate pre-training embedding, and the embedding is used as basic knowledge for obtaining additional information; the method realizes knowledge distillation across different modes, including neighbor-level distillation, community-level distribution and full-graph-level propagation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information technology, and in particular relates to a time series graph learning method combining feature pre-training and knowledge distillation. Background Art

[0002] Graph data is widely present in various scenarios in the real world, and many phenomena can be represented as graph structures. Examples of these scenarios include paper citations, email exchanges, item purchases, movie ratings, and user transactions. The scale of these datasets can be very large, so graph deep learning has become the preferred technology for efficiently mining large-scale graph data. Graph learning involves training high-dimensional sparse graph structures and representing each node as a low-dimensional dense vector, called node embedding. These embeddings can be conveniently used in various downstream tasks and applications, such as link prediction, node classification, interest recommendation, and community detection.

[0003] Sequential graph learning is an important aspect of graph deep learning, which aims to capture the dynamic patterns and evolution laws of nodes or edges in real-world graph data. Unlike classical graph learning (called static graph learning), which uses adjacency matrices to represent graph structures, sequential graph methods store the interactions between nodes in the form of adjacency sequences. The changes in data structure stem from the limitations of the adjacency matrix. Figure 1 As shown in (a), as the number of nodes increases, the size of the adjacency matrix grows exponentially, leading to serious storage requirements. Figure 1 (b) highlights the advantages of interaction sequences. In the adjacency matrix, repeated interactions between two nodes are recorded as a single event, represented as "1", regardless of the actual number of interactions. In the interaction sequence, these repeated interactions are recorded multiple times, providing richer information. This richness also includes the recording of temporal information that cannot be directly represented in the adjacency matrix. In addition, the interaction sequence can be split into multiple subsets (batches) for separate training, alleviating memory issues.

[0004] However, in the field of sequential graph learning, interaction sequences bring not only advantages but also some inevitable challenges. Specifically, while sequential graph methods benefit from the absence of an adjacency matrix, they also face obstacles in information passing in the absence of an adjacency matrix. The traditional mechanism of message passing in graph learning relies on the adjacency matrix, which can easily obtain interaction information across various orders. But in the context of sequential graph learning, this approach becomes impractical, and existing methods often focus only on first-order neighbors and temporal information, ignoring higher-order receptive fields. Although some sequential graph methods try to integrate additional modules during training to capture more comprehensive data, they often bring huge computational burdens. At the same time, their empirical results also show the importance of incorporating multi-level information, which is missing in basic sequential graph models. Summary of the invention

[0005] The purpose of the present invention is to overcome the above-mentioned problems existing in the prior art, and to provide a time series graph learning method combining feature pre-training and knowledge distillation, which redesigns the embedding method of multi-level information in the time series graph. By introducing a pre-training module, the difficult-to-obtain previous knowledge is captured and distilled into the training process.

[0006] In order to achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions:

[0007] The present invention provides a time-series graph learning method combining feature pre-training and knowledge distillation. The method divides the information in the time-series graph into time-series level, neighborhood level, community level and full-graph level; during the training process, the time-series level information is combined with the first-order neighbors, which is called time-series level combination; for information at other levels, node2vec is used as a pre-training module to generate pre-trained embeddings, and these embeddings serve as basic knowledge for obtaining additional information; the method realizes knowledge distillation across different modes, including neighbor-level distillation, community-level distribution and full-graph level propagation.

[0008] Furthermore, in the pre-training module, a large unlabeled text data corpus is first pre-trained and then fine-tuned on a labeled dataset for a specific task; the pre-trained model captures general language knowledge during the pre-training process and then adapts to the specific task during the fine-tuning process; in knowledge distillation, the large and complex model is called the teacher model, and the small and simple model is called the student model; the student model can learn from the richer and more detailed information provided by the teacher model by integrating the knowledge of the teacher model.

[0009] Furthermore, the input of this method is a timing diagram, represented as:

[0010] G=(V,E,T)

[0011] Among them, V is the node set, E is the interaction set, and T is the time set;

[0012] In sequential graph learning, the concept of edge is replaced by interaction, because an edge may have multiple interactions at different times;

[0013] The interaction between nodes x and y at time t can be expressed as (x, y, t). During the training process, these interactions will be divided into several batches in chronological order, and the model will be trained in batches; the historical first-order neighbor sequence of node x is expressed as:

[0014] H x :{(x,y1,t1),(x,y2,t2),……,(x,y n ,t n )}

[0015] The output of this method is the node embedding Z generated for all nodes after iterative training on the temporal graph; this method uses a link prediction task to predict whether two nodes influence each other.

[0016] Furthermore, pre-trained embeddings are used for multi-level information distillation during the training process, including time-level combination, neighbor-level distillation, community-level distribution, and full-graph-level propagation.

[0017] Furthermore, during training, given a node x, node2vec performs multiple random walks on it, i.e. jumping from x to one of its neighbors with probability α; this probability is controlled by two parameters p and q, where p determines the tendency of the walk to backtrack through the neighbors of the visited node, and q determines the tendency of the walk to explore new nodes, expressed as:

[0018]

[0019] Among them, d {xy} Represents the shortest path length from node x to node y;

[0020] After obtaining a set of multiple walks, node2vec uses Skip-gram technology to learn the embedding vector of each node; among them, Skip-gram defines the conditional probability between the center node x and the context node c as P(c|x), expressed as:

[0021]

[0022] Among them, s(z x ,z c ) represents the similarity between x and c, and zx represents the node embedding of x; the optimization goal of node2vec is to encourage the conditional probability P(c|x) to be as large as possible;

[0023] In the actual pre-training process, the default parameter settings of node2vec are used, that is, no modifications are made except for executing the original model; after the pre-training process, the output Z is obtained from node2vec and used as the node pre-embedding Z in the training 0 , expressed as:

[0024] L pre =maxΠ (x,c) P(c|x).

[0025] Furthermore, in the training of temporal level integration, temporal information is modeled based on the Hawkes process; specifically, given two nodes x and y interacting at time t, their conditional strength I (x,y) (t) is calculated as follows:

[0026]

[0027] in, is a similarity function that calculates the basic strength without any external influence, Inc(y,H x ) represents the Hawkes increment for assessing the impact of historical events;

[0028] Specifically, historical influence comes from the first-order neighbors of node x at time t {h} <t;

[0029] The increment is expressed as:

[0030]

[0031] This increment can be divided into three parts: the first part is the time weight, which adjusts the time interval through a learnable parameter δt, so that the interaction with a larger time interval, that is, the earlier interaction, has a smaller weight; the second part is the similarity weight, which is used to evaluate the importance of each neighbor node in the neighbor sequence; the third part is the influence of neighbor i on the target node y, that is, the neighbors of x will affect y with different weights calculated in the first and second parts;

[0032] The timing graph is represented as an undirected graph, so the interaction (x, y, t) will be treated as a new interaction (y, x, t) for training; after calculating the conditional strength, the temporal loss function can be calculated; in the actual training process, only two nodes have real interactions, and they will be considered to obtain the strength; therefore, their conditional strength should be as large as possible, and they are represented as positive pairs; for contrastive learning, several negative nodes are randomly sampled, denoted as n; in this way, the first-order temporal information can be incorporated into the node embedding, expressed as:

[0033]

[0034] Furthermore, as the model is trained, the updated node embeddings will gradually forget this information; therefore, limiting the pre-embedding With node embedding z x After each interaction, the alignment is performed so that the structural information is preserved to a desired degree; this degree can be adjusted through a hyperparameter, expressed as:

[0035]

[0036] Furthermore, community is a common concept in graph learning, indicating that different clusters include nodes with different behaviors or preferences. Student's t distribution is introduced to perform community discovery, i.e., node clustering;

[0037] Specifically, after obtaining the pre-embeddings, they are used to calculate the prior target community distribution; this distribution is used to guide community structure mining during model training, so it is necessary to use pre-embeddings instead of random initialization to obtain more reliable community centers; given a community center c k , which is embedded K-means initialization can be performed on the pre-embedding; the initial probability q of node x belonging to community k (x,k) Calculate as follows:

[0038]

[0039] On this basis, by sharpening the probability q (x,k) Get the initial prior target distribution p (x,k) :

[0040]

[0041] Community Embedded Z C will be updated as the model is trained, so p (x,k) Will also follow Z C , but the node embedding does not change, that is, when calculating the prior target community distribution, the node embedding is always Z 0 :

[0042]

[0043] Finally, the community-level loss function introduces the KL divergence to evaluate the prior distribution p (x,k) With the true distribution q (x,k,t) The difference between the two; this true distribution is also given by q (x,k) Calculated, just use the update embed Replaces pre-embedded

[0044] Furthermore, for information at the graph level, a virtual node is constructed as a graph node that interacts with all nodes; global information is propagated through the graph node embedding zG, and its initial embedding is calculated by pre-embedding:

[0045]

[0046] During training, the graph embedding is updated by the node embedding of the current batch B. In sequential graph learning, the interaction data is divided into multiple batches for training. In a batch, all interactions will be considered together. The graph embedding update during training is expressed as follows:

[0047]

[0048] The graph-level propagation module aims to propagate information from the global node to all nodes, which can be regarded as the interaction between the graph node and all nodes; the loss function is regarded as the graph embedding z G and each node embedding z t The pull-down function:

[0049]

[0050] Furthermore, the final loss function contains multi-level loss functions, expressed as:

[0051]

[0052] The beneficial effects of the present invention are:

[0053] Time-series graphs occupy an important position in graph data. They store the interactions between nodes in the form of sequences, so that the dynamic changes of each node can be observed in more detail. This data form reflects the characteristics of real-world graph data, that is, constant dynamic changes and updates. However, researchers have both gained benefits and encountered limitations in the batch processing mode based on interaction sequences for processing time-series graphs. Specifically, existing time-series graph methods mainly focus on low-order temporal information, while obtaining higher-order neighbor or community information requires increased computational costs, which significantly affects the efficiency of the model. Inspired by this, the inventors rethink how to obtain this information. To this end, a time-series graph learning method combining feature pre-training and knowledge distillation is proposed. It combines the concepts of feature pre-training and knowledge distillation and rethinks the embedding method of multi-level information fusion in time-series graphs; the method of the present invention captures and distills difficult-to-obtain information into the training module by introducing a pre-training module, thereby realizing the conversion of previous knowledge. Experimental results on several datasets verify the effectiveness and feasibility of our proposed framework. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0055] Figure 1 It is an intuitive comparison diagram of the adjacency matrix (Adj) and the interaction sequence (Seq);

[0056] Figure 2 This is a schematic diagram of the overall framework of ReMIT;

[0057] Figure 3 It is a comparison chart of the running time of the timing diagram method;

[0058] Figure 4 Schematic diagram of ablation experiment results;

[0059] Figure 5 Schematic diagram of the parameter sensitivity experiment results for the number of communities, the number of neighbors, and the number of negative samples;

[0060] Figure 6 A diagram to visualize the subgraph structure of the dataset;

[0061] Figure 7 Schematic diagram of the parameter sensitivity experimental results of the loss function weight. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] The design ideas of the present invention are as follows:

[0064] Inspired by the recently popular pre-training and then fine-tuning paradigm, the inventors rethought how to obtain this information: if it is difficult to obtain them during model training, why not obtain them before training? In addition, since model parameters can be pre-trained, the multi-level rich information required by these models can also be obtained in pre-training. Therefore, the inventors proposed a novel time series graph learning method called ReMIT, which combines the concepts of feature pre-training and knowledge distillation to rethink the way multi-level information is embedded in time series graphs. ReMIT captures and distills the difficult-to-obtain prior knowledge into the training process by introducing a pre-training module.

[0065] Specifically, the information in the time graph can be divided into several levels, including the time level, neighborhood level, community level, and full graph level. The information at the time level is easy to obtain, and the inventors combine it with the first-order neighbors during the training process, which is called time-level combination. For other levels of information, the inventors use node2vec as a pre-training module to generate pre-trained embeddings, which serve as the basic knowledge for obtaining additional information. This approach achieves knowledge distillation across different modes, including neighbor-level distillation, community-level distribution, and full-graph-level propagation. The inventors use multiple state-of-the-art methods to compare with ReMIT on various real-world time graph datasets to demonstrate the effectiveness of the method proposed by the inventors. In addition, the inventors analyzed the running time of these methods and demonstrated how ReMIT achieves performance improvements in a limited time.

[0066] The relevant specific embodiments of the present invention are as follows:

[0067] Timing diagram learning

[0068] Temporal graph learning is an important subfield of graph learning, distinguished from static graph learning by considering temporal information. Graph methods can be broadly divided into static and dynamic methods based on how they handle time. Dynamic graph models can be further divided into discrete methods, namely discrete time dynamic graphs (DTDGs), and temporal methods, namely continuous time dynamic graphs (CTDGs), also known as temporal graphs. While discrete graph methods still rely on adjacency matrices and have a similar structure to static graph methods, temporal graph methods show significant differences and have become the main focus of discussion by the inventors.

[0069] Similar to other graph learning methods, temporal graph learning can be widely used in a variety of practical scenarios, such as interest recommendation, community discovery, smart cities, knowledge graphs, rumor detection, artificial intelligence security, multimodal fusion, etc. In these practical scenarios, an unignorable reality is that the evolution of data is dynamic and real-time, which means that considering time information is very important for temporal methods.

[0070] Based on different ways of capturing temporal information, temporal graph methods can be divided into multiple categories. Some methods use random walks to model the evolution of temporal graphs, such as CTDNE and CAW. Some methods consider graph neural networks, including TGAT and TREND. Some methods introduce Hawkes processes to capture historical influences, such as HTNE, MNCI, and AGLI. Some methods focus on information fusion in temporal graphs, such as MMDNE and S2T. Some methods are committed to exploring the evolution of node representations, such as DyRep and TGN. In addition, there are several methods dedicated to exploring new boundaries of temporal graph learning. For example, JODIE goes beyond link prediction and tries to directly predict node representations at future moments, OTGNet considers temporal graph learning in open-world scenarios, and TGC is the first work to comprehensively discuss and focus on temporal graph clustering.

[0071] In these methods, various techniques are adopted during the training process to capture different levels of information. Some techniques consider community information, while others aim to access high-order neighbors. However, due to the batch-mode nature of sequential graph learning based on interaction sequences, it becomes challenging to deploy these techniques during training. Therefore, it is more difficult to obtain a comprehensive understanding of the receptive field. Inspired by this challenge, the inventors borrowed ideas from pre-training and knowledge distillation techniques to explore alternative methods to capture this information outside of training. This prompted the inventors to propose the ReMIT method. In the following sections, the inventors will briefly introduce these two techniques and discuss their integration with sequential graph learning.

[0072] Pre-training and distillation

[0073] The "pre-training and fine-tuning" paradigm and "knowledge distillation" techniques are used in deep learning to improve model performance. They have emerged in recent years and have gradually become a means for researchers to deal with complex data and modeling.

[0074] Feature pre-training draws on the popular pre-training-fine-tuning technology of large language models, which means first training the model on a large-scale dataset and then fine-tuning the model on a specific task. In the feature pre-training process, the classic model is first selected to be trained on the same dataset, and the output obtained is used as the feature with prior knowledge. In this way, the idea of ​​knowledge distillation is further borrowed, and the prior knowledge features output by the teacher model are used instead of the prior parameters to assist the training and learning of the student model, so that the student model can learn from the richer and more detailed information provided by the teacher model.

[0075] The inventors found the following commonalities between these two techniques: 1) Knowledge transfer: Both techniques involve transferring knowledge from one model to another. In "pre-training and fine-tuning", the pre-trained model transfers general language knowledge to the task-specific model. In knowledge distillation, the teacher model transfers its knowledge to the student model. 2) Performance improvement: Both techniques aim to improve the performance of the target model.

[0076] "Pre-training and fine-tuning" leverages the extensive language understanding capabilities gained during pre-training to enhance the performance of the model on specific tasks. Knowledge distillation improves the student model by leveraging the more accurate predictions and soft targets of the teacher model. In addition, since model parameters can be passed from the previous model to the subsequent model, can knowledge and information also be propagated in this way? Combined with the multi-level information that is difficult to access in the time series graph, the inventors found that this solution can be well suited for time series graph learning. Therefore, the inventors introduced the "pre-training and re-distillation" model to solve this problem. Unlike previous techniques, the inventors do not focus on the parameter details of the model, but use the pre-trained model to generate node pre-embeddings containing high-order structural information, which are then distilled through different building blocks to achieve multi-level information. Next, the inventors will discuss the details of this model in detail.

[0077] Prerequisites

[0078] Before introducing the inventors' method in detail, the inventors first introduce some definitions. The input of the method is a time-series graph, which can be expressed as G = (V, E, T), where V is the node set, E is the interaction (edge) set, and T is the time set. In time-series graph learning, researchers replaced the concept of edge with interaction, because there may be multiple interactions at different times on an edge. In addition, the interaction between nodes x and y at time t can be expressed as (x, y, t). During the training process, these interactions will be divided into several batches in chronological order, and the model will be trained in batches. In this way, the historical neighbor sequence (first order) of node x can be expressed as H x :{(x,y1,t1),(x,y2,t2),……,(x,y n ,t n The output of this method is the node embedding Z generated for all nodes after repeated training on the time series graph. The inventors use the link prediction task here, that is, predicting whether two nodes affect each other.

[0079] Figure 2 The overall framework of ReMIT. During the pre-training process, the inventors used node2vec to pre-embed general nodes without any adjustments. Then, these pre-embeds can be used in training to generate different knowledge extraction modes for different information levels, and finally reflected in the loss function of the training process.

[0080] Overall framework

[0081] like Figure 2 As shown in Figure 1, the ReMIT method consists of two processes: pre-training and training. In the pre-training process, the inventors introduced node2vec as a pre-training module to generate node pre-embedding. This pre-embedding can be used for multi-level information extraction during the training process, including time-level combination, neighbor-level distillation, community-level distribution, and full-graph-level propagation. Below, the inventors first discuss the pre-training module, then introduce the multi-level distillation mode in training, and finally outline the optimization goals.

[0082] Pre-training modules

[0083] Here the inventors choose node2vec as the pre-training module, which is a classic method in graph learning. This method uses random walks on the graph structure to obtain structural information of different orders, and its strategy can flexibly switch between breadth-first and depth-first objectives. Note that the inventors chose node2vec because it can maintain a balance between breadth and depth, making it easier to capture multi-level information. Given a node x, node2vec will perform multiple random walks on it, that is, jump from x to one of its neighbors with probability α. This probability is controlled by two parameters p and q, where p determines the tendency of the walk to backtrack through the neighbors of the visited node, and q determines the tendency of the walk to explore new nodes.

[0084]

[0085] Here {xy} represents the shortest path length from node x to node y. After obtaining a set of multiple walks, node2vec uses Skip-gram technology to learn the embedding vector of each node. Among them, Skip-gram defines the conditional probability between the center node x and the context node c as P(c|x).

[0086] Among them, s(z x ,z c ) represents the similarity between x and c, and zx represents the node embedding of x. The optimization goal of node2vec is to encourage the conditional probability P(c|x) to be as large as possible.

[0087]

[0088] In the actual pre-training process, the inventors used the default parameter settings of node2vec, that is, no modifications were made except for executing the original model. After the pre-training process, the inventors can get the output Z from node2vec as the node pre-embedding Z in the training 0 .

[0089] L pre =maxΠ (x,c) P(c|x)

[0090] Timing level combination

[0091] During training, the ReMIT method proposed by the inventors aims to capture and fuse multi-level information. As mentioned above, this information can be divided into temporal level, neighbor level, community level and graph level. Here, the inventors first discuss the combination part of the temporal level. Temporal information is very important in learning time-series graphs, so many studies have focused on it and proposed many techniques to capture temporal information.

[0092] For example, Hawkes process is a classic modeling concept that is used in many methods. Hawkes process claims that historical events affect future events, and this influence decays over time, that is, new events have a greater influence than old events. This concept encourages a variety of time series graph methods to model temporal information in this way. Specifically, given two nodes x and y interacting at time t, their conditional strength I (x,y) (t) can be calculated as follows.

[0093]

[0094] in, is a similarity function that calculates the basic strength without any external influence, Inc(y,H x ) represents the Hawkes increment for evaluating the impact of historical events. Specifically, the historical impact comes from the first-order neighbors of node x at time t {h} <t。

[0095]

[0096] This increment can be divided into three parts: 1) The first part is the time weight. The inventor adjusts the time interval through a learnable parameter δt, so that the interaction with a larger time interval (i.e., occurring earlier) has a smaller weight. 2) The second part is the similarity weight, which is used to evaluate the importance of each neighbor node in the neighbor sequence. 3) The third part is the influence of neighbor i on the target node y, that is, the neighbors of x will affect y with different weights calculated in the first and second parts. Note that the inventor represents the time sequence graph as an undirected graph, so the interaction (x, y, t) will be treated as a new interaction (y, x, t) for training. After calculating the conditional strength, the inventor can calculate the time loss function. In the actual training process, only two nodes have real interactions, and the inventor will consider them to obtain the strength. Therefore, their conditional strength should be as large as possible, and the inventor represents them as positive pairs. In order to perform contrastive learning, the inventor will also randomly sample several negative nodes, denoted as n. In this way, the first-order time information can be incorporated into the node embedding.

[0097]

[0098] Neighborhood Distillation

[0099] The above module only considers the first-order neighborhood and ignores the high-order neighborhood information. However, this information is also important in graph learning, especially in the classic message passing model, where the structural information from the high-order neighborhood can provide a considerable receptive field for the source node. Similarly, the inventors must consider that in actual training, it is difficult for the sequential graph method to construct an adjacency matrix to obtain high-order structural information. Therefore, a more feasible approach is to obtain the structural information in advance through pre-training and then refine it into the node embedding.

[0100] The concept of refinement is easy to understand. The inventors first introduced the pre-embedding in node2vec as the initial feature for training to propagate structural information, which also avoids the increase in training cost caused by random initialization. This is why the inventors gave priority to node2vec, because its depth and breadth-first random walk strategy allows the inventors to explore very deep neighborhood structures while properly retaining low-order neighborhood information. Of course, this is not enough, because as the model is trained, the updated node embeddings will gradually forget this information. Therefore, the inventors limit the pre-embedding With node embedding z x The alignment is done after each interaction so that this structural information is preserved to a desired degree, which can be tuned via hyperparameters.

[0101]

[0102] Community-level distribution

[0103] Community is a common concept in graph learning, indicating that different clusters include nodes with different behaviors or preferences. Many works consider enhancing the information content of simple graphs by building communities, which can also be achieved through pre-training. To achieve this, the inventors introduced the Student's t distribution for community discovery (i.e. node clustering).

[0104] Specifically, after obtaining the pre-embeddings, the inventors use them to calculate the prior target community distribution. This distribution is used to guide community structure mining during model training, so it is necessary to use pre-embeddings instead of random initialization to obtain more reliable community centers. Given a community center c k , which is embedded K-means can be initialized by pre-embedding. In this way, the initial probability q of node x belonging to community k is (x,k) It can be calculated as follows.

[0105]

[0106] On this basis, the inventors sharpened the probability q (x,k) Get the initial prior target distribution p (x,k) .

[0107]

[0108] It should be noted that the community embeds Z C will be updated as the model is trained, so p (x,k) Will also follow Z C However, the node embedding does not change, that is, when the inventors calculate the prior target community distribution, the node embedding is always Z 0 .

[0109]

[0110] Finally, the community-level loss function introduces the KL divergence to evaluate the prior distribution p (x,k) With the true distribution q (x,k,t) The difference between the two. This true distribution is also given by q (x,k) Calculated, just use the update embed Replaces pre-embedded

[0111] Full-image propagation

[0112] For information at the graph level, the inventors tried to generate a global receptive field for all nodes. The implementation method is very simple, that is, to build a virtual node as a graph node that interacts with all nodes. In this way, global information can be propagated through the graph node embedding zG, and its initial embedding can be calculated by pre-embedding.

[0113]

[0114] During training, the graph embedding can be updated by the node embedding of the current batch B. It should be noted that in sequential graph learning, the interaction data should be divided into multiple batches for training. This means that in one batch, all interactions will be considered together. Therefore, the graph embedding update during training can be expressed as follows.

[0115]

[0116] The graph-level propagation module aims to propagate information from the global node to all nodes, which can be regarded as the interaction between the graph node and all nodes. Therefore, the loss function can be regarded as the graph embedding z G and each node embedding z t The pull-down function.

[0117]

[0118] Loss Function

[0119] The final loss function contains the above multi-level loss functions, in which the time loss is also the main loss, namely the task loss. Please note that for different loss functions, if different λ values ​​are specified, better results will certainly be achieved. However, the inventors believe that a unified λ is sufficient to prove the effectiveness of the inventors' strategy, that is, the performance of the model proposed by the inventors is not obtained by repeatedly adjusting the hyperparameters.

[0120]

[0121] From the loss function, the inventors can once again prove the importance of pre-training and distillation mode. Regardless of the information level, pre-embedding is used in different ways and participates in module optimization. In this case, noisy or even completely random features cannot meet this reliability requirement.

[0122] Experimental Dataset

[0123] The inventors compared the proposed ReMIT with multiple state-of-the-art baseline methods on multiple real-world time series graph datasets. As shown in Table 1, these datasets belong to different fields. DBLP is a common co-author academic graph dataset, where the co-authorship relationships between researchers are considered as interactions. BITotc and BITalpha are two online transaction datasets where users frequently trade on two online transaction dataset platforms. ML1M is a common movie rating dataset where people rate different movies. Amazon is an e-commerce time series graph containing magazine subscriptions and ratings on the Amazon website.

[0124] Table 1: Dataset description

[0125]

[0126] Experimental comparison method

[0127] For performance comparison, the inventors chose a static graph method and a sequential graph method. Static graph method: node2vec improves Deepwalk by designing depth-first and breadth-first random walk strategies. GAE introduces the concept of autoencoder into graph learning. SDCN is a deep fusion network that combines multiple neural network modules. DFCN improves SDCN by considering the features and structures in the graph.

[0128] Temporal graph methods: HTNE is a classic temporal graph learning method that first introduced the Hawkes process to simulate temporal information. JODIE designs static and dynamic embeddings and predicts future node embeddings. TGN attempts to dynamically store node embeddings during training. MNCI considers community and neighborhood information fusion in temporal graph learning. TREND introduces classic graph neural network methods into temporal graph learning. AGLI is the inventor's conference version method, which mines global and local information at the same time. OTGNet focuses on temporal graph learning in open world scenarios.

[0129] Experimental setup

[0130] In the experiments, the inventors compared ReMIT with other SOTA methods on the link prediction task. In addition, the inventors conducted other experiments, including runtime analysis ablation studies and parameter sensitivity studies. For all baseline methods, the inventors used their default hyperparameter settings in training. For the ReMIT method proposed by the inventors, there are several hyperparameters. For the number of communities |C|, the inventors set the default value to 5 or 10. For the number of historical neighbors |H|, the inventors set the default value to 5. For the number of negative samples S, the inventors set the default value to 10. The default value of the loss weight λ is 0.01. It should be noted that these default parameters are not necessarily the optimal parameters for different datasets, but can meet the needs of most datasets. The best parameter selection for different datasets will be analyzed in the parameter sensitivity study.

[0131] Table 2: Link prediction experimental results

[0132]

[0133] Link prediction performance

[0134] As shown in Table 2, the inventors performed a link prediction analysis on the ReMIT method and various SOTA methods. It is obvious that the static graph method performs poorly compared to the sequential graph method, thus highlighting the importance of prioritizing temporal information. In addition, ReMIT shows commendable performance on all datasets and shows noteworthy improvements on specific datasets. For example, it achieves a significant improvement of 10.36% on the BITotc dataset and 5.90% on the BITalpha dataset. These results demonstrate the effectiveness of the concept proposed by the inventors, that the model performance can be significantly improved through the pre-training and re-distillation mode. In addition, it is worth emphasizing that ReMIT not only outperforms its peers in performance, but also maintains excellent efficiency in training time. This will be elaborated in detail in subsequent sections.

[0135] Run time analysis

[0136] exist Figure 3 In , the inventors compared the running performance of existing timing diagram methods. The running time is measured in minutes, with a maximum limit of 60 minutes. If the running time exceeds this threshold, it is recorded as 60 minutes. It should be acknowledged that the inventors' ReMIT method spends some time in the pre-training phase. However, the knowledge gained through pre-training effectively speeds up the training of the model. For example, compared to the baseline method that typically requires 50 cycles to converge, ReMIT only requires fewer cycles (such as 20 cycles) to achieve convergence, thereby shortening the overall training time. This observation highlights the key point that the inventors wish to emphasize: pre-training and then patterning enables the method to converge faster, thereby improving its overall efficiency.

[0137] Ablation experiment

[0138] To evaluate the efficacy of each module in our method, we performed an ablation study. As mentioned earlier, our loss function consists of four different components, and we systematically removed one module at a time to observe the corresponding impact. For example, when the time loss is removed, we named the model "ReMITw / 0T", while "ReMIT" represents the full method. It is worth noting that even if the time loss is not considered, its loss function is still adopted because it is the basic optimization objective. In this case, the only part removed is related to the Hawkes increment in the conditional strength calculation.

[0139] like Figure 4 As shown, the inventors compared the performance differences of ReMIT and its four variants on all datasets. Undoubtedly, the full version of ReMIT has the best effect. In addition, omitting the time loss often leads to a significant decrease in the effect. However, it is worth emphasizing that the performance differences brought by the four variants on different datasets are different, and the inventors attribute it to different data distributions. On some datasets, the models attach great importance to their respective global vision, while on other datasets, they prioritize the effects of high-order neighborhood structures. In summary, although the performance observed on different datasets varies, the inventors' experimental results show that each of the proposed multi-level information components plays an indispensable role.

[0140] Parameter sensitivity study

[0141] In this section, the inventors will discuss several different hyperparameters: the number of communities |C|, the number of neighbors |H|, the number of negative samples S, and the loss weight λ. All of these hyperparameters play different roles in model training, and the inventors hope to study their different effects on performance. Figure 5 In , the inventors aligned the parameter sensitivity studies of |C|, |H| and S because their value ranges are the same.

[0142] Number of communities

[0143] When obtaining community-level information, a predetermined number of communities is usually specified. However, in most datasets, the actual classes are unknown, so it is challenging to directly obtain the number of communities. Therefore, the inventors treat it as a hyperparameter and define the number of communities by specifying different numerical ranges. In this embodiment, the inventors chose values ​​such as 1, 2, 3, 5, and 10 to specify |C|. The purpose of this is to study the impact of different numbers of communities on the overall effect. Figure 5 As shown in (a), no matter how the number of communities fluctuates, the overall effect of the model always remains in a relatively stable range. This is because the community distribution derived from the acquired community information basically represents the probability mapping of similarity. Therefore, this distribution is conducive to clustering similar nodes in the same community. In addition, no matter how many communities there are, the final distribution result can be obtained.

[0144] Number of neighbors

[0145] Similar to the number of communities, the number of neighbors is also a hyperparameter that needs to be manually controlled in sequential graph learning. This control is necessary because after stopping using the adjacency matrix, the sequential graph method needs to adjust the length of the adjacency sequence of each node in batch training so that it can be calculated simultaneously in the same batch. Figure 5 As can be seen in (b), changing the number of neighbors has little effect on the model. However, it is worth noting that different datasets have different sensitivities to this hyperparameter.

[0146] For example, as shown in Table 1, the average node degrees of the two datasets ML1M and Amazon have the largest difference, which are 225.78 and 2.41 respectively. Figure 6 In the , the inventors used the number of interactions as a criterion to observe the change in the number of nodes with the same number of edges. Specifically, "ML1M-10" means selecting 10 interactions from the ML1M dataset, while "Amazon-200" means selecting 200 interactions from the Amazon dataset.

[0147] By inspecting the number of nodes displayed, it is clear that different node degrees lead to significant differences in the distribution of different datasets. As the number of neighbors increases, the impact on ML1M increases, while the impact on Amazon decreases. This difference is caused by the process of obtaining the neighbor sequence. When a node does not have enough neighbors, the inventors use masks to fill the gaps. In the case of Amazon, the number of neighbors for each node is extremely limited, so sparsity is prone to occur. Even if |H| is increased to 10, a considerable number of nodes in ML1M are still able to obtain a sufficient number of neighbors. Therefore, differences in node degrees lead to different sensitivity to parameters for different datasets, and the number of negative samples S also reflects this phenomenon.

[0148] Number of negative samples

[0149] Different average node degrees of different data sets lead to different sensitivities, and this phenomenon is more prominent and obvious in the number of negative samples S. Figure 5 In (c), we can observe that there are significant differences in the trends of ML1M and Amazon on the three indicators. When the number of negative samples is small, Amazon can achieve the expected effect, but this effect gradually weakens as the number of negative samples increases. On the other hand, ML1M has been continuously improving as the number of negative samples increases.

[0150] This phenomenon can be explained by considering the strength of the interaction conditions of positive and negative samples when calculating the loss function. As the number of negative samples increases, the strength of negative samples will also increase. If the dataset has enough positive samples (i.e., neighboring samples) corresponding to these negative samples, a more optimal optimization can be performed. However, it is worth noting that although the datasets have different sensitivities to these parameters, the overall performance curve changes relatively smoothly. This shows that the inventor's method is not easily affected by the specific values ​​of the hyperparameters.

[0151] Loss Weight

[0152] The loss weight λ is also a hyperparameter used to control the ratio of different information fusion loss functions. If different λ values ​​are given, better results will be achieved. However, the inventor believes that a unified λ is sufficient to prove the effectiveness of the inventor's strategy, that is, the performance of the model proposed by the inventor is not obtained by repeatedly adjusting hyperparameters. Figure 7 As shown in the figure, when the inventors controlled the lambda value within the range of 1, 0.1, 0.01 and 0.001, the parameter sensitivity of all data sets changed. In most cases, the effect of the model increased first and then decreased. This is easy to understand: the main loss of the model is still link prediction. When the inventors give too high a weight to the auxiliary loss, the model will shift part of its "attention" to optimizing the auxiliary loss function. However, these auxiliary loss functions are specially designed to strengthen the downstream optimization of the main loss function.

[0153] Therefore, too high a weight will affect the optimization focus of the model. When the weight gradually decreases to a certain level, the model no longer considers the auxiliary loss important enough to be ignored. As a result, the effectiveness of the model will decrease slightly. Therefore, there is a balance between these weights that enables the model to prioritize the main loss function while appropriately allocating attention to multi-level information fusion.

[0154] This embodiment addresses the problem of incorporating neglected multi-level information in time series graph learning, and designs the ReMIT method to fuse multi-level information through a pre-trained re-distillation model. Prior knowledge is obtained by developing a pre-trained model, which is transformed to capture information at different levels. Subsequently, a loss function is constructed to facilitate the fusion process. Considering aspects such as training efficiency and parameter sensitivity, the proposed method is evaluated by conducting experiments on various real-world datasets. The experimental results strongly demonstrate the effectiveness of the method proposed by the inventors.

[0155] The preferred embodiments of the present invention disclosed above are only useful to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A time series graph learning method combining feature pre-training and knowledge distillation, characterized in that: This method divides the information in the time graph into time level, neighborhood level, community level and full graph level; during the training process, the time level information is combined with the first-order neighbors, which is called time level combination; for other levels of information, node2vec is used as a pre-training module to generate pre-trained embeddings, which serve as the basic knowledge for obtaining additional information; this method realizes knowledge distillation across different modes, including neighbor-level distillation, community-level distribution and full-graph level propagation.

2. According to the time series graph learning method combining feature pre-training and knowledge distillation described in claim 1, feature pre-training draws on the popular pre-training-fine-tuning technology of the current large language model, which refers to first training the model on a large-scale data set and then fine-tuning the model on a specific task. In the feature pre-training process, a classic model is first selected to be trained on the same data set, and the output obtained is used as a feature with prior knowledge. In this way, the idea of ​​knowledge distillation is further borrowed, and the prior knowledge features output by the teacher model are used instead of the prior parameters to assist the training and learning of the student model, so that the student model can learn from the richer and more detailed information provided by the teacher model.

3. The method for learning a time series graph combining feature pre-training and knowledge distillation according to claim 2, characterized in that: The input to this method is a timing diagram, represented as: G=(V,E,T) Among them, V is the node set, E is the interaction set, and T is the time set; In sequential graph learning, the concept of edge is replaced by interaction, because an edge may have multiple interactions at different times; The interaction between nodes x and y at time t can be expressed as (x, y, t). During the training process, these interactions will be divided into several batches in chronological order, and the model will be trained in batches; the historical first-order neighbor sequence of node x is expressed as: H x :{(x,y1,t1),(x,y2,t2),……,(x,y n ,t n )} The output of this method is the node embedding Z generated for all nodes after iterative training on the temporal graph; this method uses a link prediction task to predict whether two nodes influence each other.

4. The method for learning a time series graph combining feature pre-training and knowledge distillation according to claim 3, characterized in that: Pre-trained embeddings are used for multi-level information distillation during training, including time-level combination, neighbor-level distillation, community-level distribution, and full-graph-level propagation.

5. The method for learning a time series graph combining feature pre-training and knowledge distillation according to claim 4, characterized in that: During training, given a node x, node2vec performs multiple random walks on it, i.e. jumping from x to one of its neighbors with probability α; this probability is controlled by two parameters p and q, where p determines the tendency of the walk to backtrack through the neighbors of the visited node, and q determines the tendency of the walk to explore new nodes, expressed as: Among them, d {xy} represents the shortest path length from node x to node y; After obtaining a set of multiple walks, node2vec uses Skip-gram technology to learn the embedding vector of each node; among them, Skip-gram defines the conditional probability between the center node x and the context node c as P(c|x), expressed as: Among them, s(z x , z c ) represents the similarity between x and c, and zx represents the node embedding of x; the optimization goal of node2vec is to encourage the conditional probability P(c|x) to be as large as possible; In the actual pre-training process, the default parameter settings of node2vec are used, that is, no modifications are made except for executing the original model; after the pre-training process, the output Z is obtained from node2vec and used as the node pre-embedding Z in the training 0 , expressed as: L pre =maxΠ (x,c) P(c|x)。 6. The method for learning a time series graph combining feature pre-training and knowledge distillation according to claim 5, characterized in that: In the training of temporal level combination, temporal information is modeled based on the Hawkes process; specifically, given two nodes x and y interacting at time t, their conditional strength I (x,y) (t) is calculated as follows: in, is a similarity function that calculates the basic strength without any external influence, Inc(y, H x ) represents the Hawkes increment for assessing the impact of historical events; Specifically, historical influence comes from the first-order neighbors of node x at time t {h} <t; The increment is expressed as: This increment can be divided into three parts: the first part is the time weight, which adjusts the time interval through a learnable parameter δt, so that the interaction with a larger time interval, that is, the earlier interaction, has a smaller weight; the second part is the similarity weight, which is used to evaluate the importance of each neighbor node in the neighbor sequence; the third part is the influence of neighbor i on the target node y, that is, the neighbors of x will affect y with different weights calculated in the first and second parts; The timing graph is represented as an undirected graph, so the interaction (x, y, t) will be treated as a new interaction (y, x, t) for training; after calculating the conditional strength, the temporal loss function can be calculated; in the actual training process, only two nodes have real interactions, and they will be considered to obtain the strength; therefore, their conditional strength should be as large as possible, and they are represented as positive pairs; for contrastive learning, several negative nodes are randomly sampled, denoted as n; in this way, the first-order temporal information can be incorporated into the node embedding, expressed as:

7. The method for learning a time series graph combining feature pre-training and knowledge distillation according to claim 6, characterized in that: As the model is trained, the updated node embeddings will gradually forget this information; therefore, limiting the pre-embedding With node embedding z x After each interaction, the alignment is performed so that the structural information is preserved to a desired degree; this degree can be adjusted through a hyperparameter, expressed as:

8. The method for learning a time series graph combining feature pre-training and knowledge distillation according to claim 7, characterized in that: Community is a common concept in graph learning, indicating that different clusters include nodes with different behaviors or preferences. Student's t distribution is introduced to perform community discovery, i.e. node clustering. Specifically, after obtaining the pre-embeddings, they are used to calculate the prior target community distribution; this distribution is used to guide community structure mining during model training, so it is necessary to use pre-embeddings instead of random initialization to obtain more reliable community centers; given a community center c k , which is embedded K-means initialization can be performed on the pre-embedding; the initial probability q of node x belonging to community k (x,k) Calculate as follows: On this basis, by sharpening the probability q (x,k) Get the initial prior target distribution p (x,k) : Community Embedded Z C will be updated as the model is trained, so p (x,k) Will also follow Z C , but the node embedding does not change, that is, when calculating the prior target community distribution, the node embedding is always Z 0 : Finally, the community-level loss function introduces the KL divergence to evaluate the prior distribution p (x,k) With the true distribution q (x,k,t) The difference between the two; this true distribution is also given by q (x,k) Calculated, just use the update embed Replaces pre-embedded 9. The method for learning a time series graph combining feature pre-training and knowledge distillation according to claim 8, characterized in that: For graph-level information, a virtual node is constructed as a graph node that interacts with all nodes; global information is propagated through the graph node embedding zG, whose initial embedding is calculated by pre-embedding: During training, the graph embedding is updated by the node embedding of the current batch B. In sequential graph learning, the interaction data is divided into multiple batches for training. In a batch, all interactions will be considered together. The graph embedding update during training is expressed as follows: The graph-level propagation module aims to propagate information from global nodes to all nodes, which can be regarded as the interaction between graph nodes and all nodes; The loss function is regarded as the graph embedding z G and each node embedding z t The pull-down function:

10. The method for learning a time series graph combining feature pre-training and knowledge distillation according to claim 9, characterized in that: The final loss function contains multi-level loss functions, expressed as:

Citation Information

Cited By

  • Middle vocational and higher vocational teaching reform assisting method and system

    CN119444520A

  • Controllable community graph data generation method and system

    CN120107408A

  • Bucket wheel machine operation image monitoring method and system based on neural network

    CN120298975A