A spatiotemporal graph feature extraction method based on causal invariance

By generating node embeddings of core structures and complementary views through causal scoring and heterogeneous feature extraction modules, combined with embedding contrastive learning, the problem of unstable feature extraction of graph neural networks in spatiotemporal network data is solved, and the stability and accuracy of the model are improved.

CN117218362BActive Publication Date: 2025-09-30NANJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311425247.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2025-09-30
Estimated Expiration
2043-10-30

AI Technical Summary

Technical Problem

Existing graph neural networks have difficulty extracting stable feature embeddings on graph data, especially in the field of spatiotemporal network data. Traditional methods fail to effectively deal with the impact of data distribution offset, resulting in insufficient model generalization.

Method used

A spatiotemporal graph feature extraction method based on causal invariance is adopted. The node importance is scored and sampled through the causal scoring module. The heterogeneous feature extraction module and the embedding contrastive learning module are combined to generate node embeddings of core structure and complement view. The heterogeneous graph neural network (RGCN) is then used for feature extraction and mapping.

Benefits of technology

It improves the performance of graph neural networks in downstream tasks, enhances the stability and accuracy of the model's feature extraction in spatiotemporal network data, strengthens the limitations of the graph comparative learning framework, and retains key information in the graph.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117218362B_ABST
    Figure CN117218362B_ABST
Patent Text Reader

Abstract

The present invention provides a method for extracting spatiotemporal graph features based on causal invariance, comprising a causal scoring module, a heterogeneous feature extraction module, and an embedding comparative learning module. The method first scores the importance of each node in the spatiotemporal graph, and based on the scores, samples the spatiotemporal graph to obtain a core structure view and a complement view, respectively. The sampled core structure view and complement view are then embedded to obtain node embeddings for the core structure view and node embeddings for the complement view, respectively. The node representations obtained by mapping each node embedding are used for comparative learning to train and improve the model. The present invention uses the principle of causal invariance to guide graph comparative learning, and improves the performance of comparative learning by discovering the core structure of the graph. This method is applied to spatiotemporal graph feature extraction, learns the graph structure of spatiotemporal network data, and extracts stable feature embeddings to combine with relevant graph neural networks to improve their performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of machine learning, and in particular relates to a spatiotemporal graph feature extraction method based on causal invariance. Background Art

[0002] In the field of data processing, the key to the effective implementation of relevant algorithms lies in the feature extraction of raw data. Appropriate and accurate feature extraction can significantly improve the accuracy of relevant data processing algorithms. Graph data, a data structure consisting of a collection of nodes and edges, is primarily used to model complex relationships and dependencies between a set of objects (entities), such as interactions between microscopic particles and chemical molecular structures, or macroscopic communication or transportation networks. Accordingly, graph data feature extraction aims to mine useful information from datasets represented by graph structures. With the development of the digital world in recent decades, graph feature extraction has found important applications in areas such as social networks, molecular structure analysis, and traffic forecasting.

[0003] Graph data has two distinct characteristics: First, its non-Euclidean data structure; that is, the graph data structure is irregular, with nodes arranged in an irregular order. Second, the graph data structure itself contains rich relational information. Each node is related to other surrounding nodes, containing complex connection information that captures dependencies between data. Due to these characteristics, traditional methods for extracting Euclidean data features based on deep learning neural networks are difficult to directly transfer to graph data. When using traditional deep learning methods to extract features from graph data, existing graph neural networks are affected by data distribution bias and are unable to accurately discover the core structure of the data, ultimately resulting in insufficient model generalization.

[0004] To address the impact of unknown distribution shifts on graph data and achieve the goal of extracting stable graph feature embeddings, existing research falls into three main categories: data augmentation-based methods, model-based methods, and learning strategy-based methods. However, none of these methods fully utilize graph information, and related research has yet to be extended to the field of spatiotemporal network data. Therefore, learning stable feature embeddings that are invariant to data distribution shifts remains a major challenge in the field of graph neural networks. Summary of the Invention

[0005] In response to the shortcomings of the existing technology, the present invention provides a spatiotemporal graph feature extraction method based on causal invariance to overcome the impact of unknown distribution offset on graph data and solve the problem of embedding and extraction of related graph features.

[0006] The present invention achieves the above technical objectives through the following technical means.

[0007] A method for extracting features from spatiotemporal graphs based on causal invariance uses the following network model to extract features from traffic flow data: it includes a causal scoring module and a heterogeneous feature extraction module. In the causal scoring module, importance scores are assigned to each node in the spatiotemporal graph, and the spatiotemporal graph is sampled based on the scores to obtain a core structure view and a complement view. In the heterogeneous feature extraction module, the sampled core structure view and complement view are embedded to obtain node embeddings of the core structure view and the complement view, respectively.

[0008] Furthermore, it also includes an embedded contrastive learning module; after obtaining the node embedding of the core structure view and the node embedding of the complement view in the heterogeneous feature extraction module, each node embedding is mapped to obtain their respective projection representations; in the embedded contrastive learning module, node contrastive learning is performed on the projection representation to train the network model.

[0009] Furthermore, the causal scoring module is provided with a core structure generator network r(·) to perform node importance scoring. The r(·) is an encoder of the GNN-MLP combination. The node features and edge features of the spatiotemporal graph g are input into r(·) to generate a normalized node attribute score vector P. The vth element in the score vector P corresponds to the score p(v|g) of the node v.

[0010] Furthermore, the causal scoring module performs three samplings, namely, two core structure view samplings and one complement view sampling, wherein the core structure view sampling is:

[0011] R(g)~P R (·|G=g)st|V R |=ρ·|V|

[0012] The complement view sampling is:

[0013] C(g)~P C (·|G=g)st|V C |=ρ·|V|

[0014] The above R(g) represents the core structure view, C(g) represents the complement view, and P R (·|G=g) represents the probability distribution of the core structure in the spatiotemporal graph g, P C (·|G=g) represents the probability distribution of complement, V R Represents the node set of the core structure R(g), V C represents the node set of the complement set C(g), V represents the node set of the spatiotemporal graph g, and ρ is a hyperparameter (0, 1);

[0015] The probability distribution of the core structure R(G) in the space-time graph G=g is:

[0016]

[0017] The probability distribution of the complement C(G) is:

[0018]

[0019] Where p(v|g) is the importance score of node v, which indicates the probability that node v is included in the core structure R(g); 1-p(v|g) is the unimportance score of node v, which indicates the probability that node v is not included in the core structure; a node is considered a key node when it is sampled into the core structure view, otherwise it is considered a non-key node; based on the different types of nodes at both ends, there are four types of edge relationships between the two nodes.

[0020] Furthermore, in the heterogeneous feature extraction module, the node information representation vector and the edge information representation vector of each view are first dimensionally expanded through a feedforward network, and then each view is input into the GNN encoder to obtain a node representation. Finally, the obtained node representation is input into the heterogeneous graph neural network RGCN, and RGCN is used to associate with the score vector P to generate the embedding of each node.

[0021] Furthermore, the dimension expansion is:

[0022]

[0023]

[0024] in is the node information embedding vector, is the side information embedding vector, x v is the node information representation vector, x e is the side information representation vector, W v and W e x v and x e The corresponding weight matrix.

[0025] Furthermore, the GNN encoder generates a node representation as:

[0026]

[0027] Where σ is the activation function, is the node representation of node i in the lth layer, is the node representation of the l+1th layer of node i, is the node representation of node j at layer l, is the set of neighbor nodes that have k types of edges with node i, K is the set of all edge relationships, h e,jis the edge information embedding vector of node j, is the weight matrix of the lth layer of the k-type edge relationship, is the weight matrix of node i itself in layer l.

[0028] Furthermore, the node representation of the core structure view and the node representation of the complement view are input into the heterogeneous graph neural network RGCN respectively, and the node embedding x of the core structure view is obtained accordingly. R and the node embedding x of the complement view C ; Then use projection q(·) to embed the above nodes into x R and x C Mapping is performed to generate a projection representation r of the core structure view node and a projection representation c of the complement view node respectively; the q(·) is a multi-layer perceptron MLP with L2 normalized output.

[0029] Furthermore, the embedding contrastive learning module is provided with a loss function:

[0030]

[0031] Where τ is a normalized hyperparameter. The different node embeddings of the same node under the two core structure views are regarded as a pair of positive sample pairs. The corresponding projection representations of the two node embeddings in the positive sample pair are recorded as and The remaining nodes in the two core structure views except the positive samples are embedded as negative samples, and the projection representation of the negative samples is denoted as r - , The projection representation r of the negative sample - By minimizing the loss function l su (g) Keep the positive sample pairs of the same node consistent.

[0032] Furthermore, the embedding contrastive learning module is provided with an objective function:

[0033]

[0034] Where λ is the weight coefficient, and the loss function l in (g) is:

[0035]

[0036] Where C is the set of projection representations c of the complement view nodes.

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

[0038] (1) The present invention provides a spatiotemporal graph feature extraction network model based on causal invariance, in which the causal invariance principle is used to guide the enhancement limitations in the graph contrastive learning framework, and the performance of contrastive learning is promoted by discovering the core structure of the graph.

[0039] (2) The present invention introduces the idea of ​​heterogeneous graph representation into the graph comparison framework to divide and embed node types, retaining all the information in the graph to avoid missing key information, thereby improving the performance of the model in downstream tasks.

[0040] (3) The network model proposed in this invention can learn the spatiotemporal network data graph structure, extract stable feature embeddings to combine with relevant graph neural networks, and promote the downstream task processing performance of downstream graph neural networks. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a system framework diagram of the network model of the present invention. DETAILED DESCRIPTION

[0042] The following describes embodiments of the present invention in detail. Examples of the illustrated embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and are not to be construed as limiting the present invention.

[0043] 1. Network model structure description

[0044] like Figure 1 The network model structure for spatiotemporal graph feature extraction shown in the figure mainly consists of three modules: causal scoring module, heterogeneous feature extraction module, and embedding contrastive learning module. The detailed description of each module is as follows:

[0045] 1. Causal Scoring Module

[0046] For a given anchor graph (i.e., original graph, space-time graph) G = g (g is represented as an instance of the anchor graph G; this is the standard notation in statistics, G can be understood as a random variable, and g is a specific value of the random variable), the core structure R(G) of the anchor graph G follows the probability distribution P R (R(G)|G=g):

[0047]

[0048] Where V represents the node set of g, V R represents the node set of the core structure R(g) of g, p(v|g) represents the probability that node v is included in the core structure R(g), C(g) is the complement of the core structure R(g), V C is the node set of the complement C(g).

[0049] Correspondingly, the probability distribution of the complement of R(G) C(G) is:

[0050]

[0051] Where 1-p(v|g) represents the probability that node v is not included in the core structure R(g).

[0052] In summary, p(v|g) measures the importance of node v, so p(v|g) is used as the importance score of node v. Next, the core structure generator network r(·) is used to parameterize the scoring function p(·|g):

[0053] P=r(g)

[0054] Where r(·) is an encoder of a GNN-MLP combination, which outputs a normalized node attribute score vector P after inputting the node features and edge features of the graph g; where the score vector The vth element in corresponds to the score p(v|g) of node v.

[0055] After assigning an importance score to each node in the spatiotemporal graph G = g using r(·), we can sample from g based on the importance score to obtain the core structure view (i.e., R(g)) and the complement view (i.e., C(g)). The sampling process is as follows:

[0056] 1) The first two samplings are core structure view sampling, which is used to sample two core structure views R(g) from the original graph g. Specifically, from the core structure distribution P of g R Sampling is performed in (·|G=g):

[0057] R(g)~P R (·|G=g)st|V R |=ρ·|V|

[0058] where ρ is a hyperparameter (0, 1). The sampling process above samples ρ·|V| nodes from the original graph g based on the previously obtained score vector P (i.e., based on the importance score p(v|g) of each node). The view composed of these ρ·|V| sampled nodes is the core structure view R(g). Accordingly, these ρ·|V| sampled nodes are considered "key nodes," and the remaining (1-ρ)·|V| nodes that were not sampled are considered "non-key nodes." The sampling process is repeated twice, resulting in two core structure views R(g).

[0059] 2) The third sampling is complement view sampling, which is used to sample a complement view C(g) from the original image g. The sampling method is similar to the core structure sampling:

[0060] C(g)~P C (·|G=g)st|V C |=ρ·|V|

[0061] In the above sampling process, probabilistic sampling is performed based on the unimportance score 1-p(v|g), and ρ·|V| nodes are sampled from the original graph g. These ρ·|V| sampled nodes constitute the complement view C(g); accordingly, these sampled ρ·|V| nodes are regarded as "non-critical nodes", and the remaining (1-ρ)·|V| nodes that have not been sampled are regarded as "critical nodes".

[0062] Note: A node is considered a key node when it is sampled into the core structure view, otherwise it is considered a non-key node.

[0063] In the causal scoring module, by introducing heterogeneous graph representations, the nodes in the spatiotemporal graph are divided into two categories: key nodes that constitute the core structure, and the remaining non-key nodes. The graph structure data consists of these nodes and the edges between them. Each edge connects a node at each end, and the nodes at either end may be classified as "key nodes" or "non-key nodes." Therefore, based on the difference in the nodes at the ends, the edges are divided into four categories: key node-key node, key node-non-key node, non-key node-key node, and non-key node-non-key node, representing four different types of edge relationships.

[0064] 2. Heterogeneous feature extraction module

[0065] In the causal scoring module, each node in the spatiotemporal graph is first scored. Three samplings are then performed based on the scores, resulting in three views. Next, the heterogeneous feature extraction module embeds the information from the three views by introducing heterogeneous graph representations.

[0066] First, the node information representation vectors and edge information representation vectors in the three views are dimensionally expanded through the feedforward network:

[0067]

[0068] in is the node information embedding vector, is the side information embedding vector, x v is the node information representation vector, x e is the side information representation vector, W v and W e x v and x e The corresponding weight matrix.

[0069] After the longitude and latitude expansion, the information in the three views is input into the GNN encoder to generate node representations:

[0070]

[0071] Where σ is the activation function, is the node representation of node i in the lth layer, is the node representation of the l+1th layer of node i, is the node representation of node j at layer l, is the set of neighbor nodes that have k types of edges with node i, K is the set of all edge relationships (the four types of edges mentioned above), h e,j is the edge information embedding vector of node j, is the weight matrix of the lth layer of the k-type edge relationship, is the weight matrix of node i itself in layer l. When used, the node information of each node obtained by the previous step of dimensional expansion is embedded in the vector Substitute into the case of l=0 and Embed the obtained side information into vectors Substitute h e,j , thereby using the GNN encoder to generate each node representation.

[0072] After generating the node representation, the node representations of the above three views are input into the heterogeneous graph neural network RGCN respectively; RGCN is used to associate with the node attribute score vector P obtained previously to generate the node embedding x of the core structure view respectively. R and the node embedding x of the complement view C :

[0073] x R =f(g)=RGCN(g)⊙P

[0074] x C =f(g)=RGCN(g)⊙P

[0075] where x R is the node embedding in the core structure view after combining the node attribute score vector P, x C is the node embedding in the complement view after combining the node attribute score vector P.

[0076] Then the projection q(·) is used to embed the above nodes into x R Mapped to another latent space, the corresponding projection representation r is generated for subsequent contrastive learning; the relevant projection process can be expressed as:

[0077] r=q(x R )=L2(MLP(x R))

[0078] where q(·) is a multilayer perceptron (MLP) with L2-normalized output. L2-normalized output is the division of each component of a vector by the L2-norm of the vector. The L2-norm is the square root of the sum of the squares of the elements of the vector.

[0079] Similarly, embed the node into x C Mapping is performed to obtain the projection representation c:

[0080] c=q(x C )=L2(MLP(x C ))

[0081] The node embedding x of the core structure view obtained above R and the node embedding x of the complement view C , which is the output result of the spatiotemporal graph feature extraction network model of the present invention.

[0082] 3. Embedding contrastive learning module

[0083] After obtaining the projection representation of each node in the heterogeneous feature extraction module, the embedded contrastive learning module performs contrastive learning of the nodes. The model is trained through contrastive learning to improve the spatiotemporal graph feature extraction network model and enhance the accuracy of feature extraction.

[0084] For graph g, two core structure views have been sampled in the causal scoring module. The same node may be sampled in both core structure views at the same time. Then, in the heterogeneous feature extraction module, two sets of node embeddings are obtained for the two core structure views. The different node embeddings of the same node in the two core structure views are regarded as a pair of positive sample pairs. The corresponding projection representations of the two node embeddings in the positive sample pair are recorded as and That is to say and is the projection representation of the same node in two different core structure views. The node embedding of other nodes in the two core structure views except the same node (positive sample) is used as a negative sample, and the projection representation of the negative sample is recorded as r - , represented by the projection of the negative sample r - The set composed of

[0085] The following loss function is established based on the sufficiency principle:

[0086]

[0087] where τ is a normalization hyperparameter, yes , exp(·) is the exponential function, and lgo(·) is the logarithmic function.

[0088] By minimizing the above loss function l su (g), so that the positive sample pairs of the same node remain consistent.

[0089] In addition, for the complementary view sampled by the heterogeneous feature extraction module, the node embeddings of the nodes in this complementary view are used as additional negative samples. Based on the independence principle, the following loss function is established:

[0090]

[0091] Where C is the set of projection representations c of the nodes in the complement view. By minimizing the loss function l in (g) The node embedding of the key node is distanced from the embedding of other non-key nodes, so that the extracted node embedding remains as stable as possible when other nodes change.

[0092] Finally, the above two loss functions are combined to obtain the objective function of the model of the present invention:

[0093]

[0094] Where λ is the weight coefficient, is the mathematical expectation symbol.

[0095] Finally, the network model of the present invention is trained by solving the above objective function minL, and then the node embedding x in the spatiotemporal graph g is extracted using the trained network model. R and x C .

[0096] 2. Testing

[0097] The effectiveness of the present invention was verified using the regional traffic flow dataset PeMS-04 as a test sample, with the adaptive graph convolutional recurrent network (AGCRN) model selected as the benchmark. Specifically, the proposed network model was used to learn stable feature embeddings on the training set. The dimensionality was then compressed to match the AGCRN output using a feedforward network, which then served as the residual to correct the AGCRN output. The corrected results were compared with the original AGCRN output to verify the effectiveness of the present invention in improving the relevant graph neural network.

[0098] This test uses a graph neural network for traffic forecasting, predicting traffic conditions for the next hour based on sample data from the previous hour. The dataset is divided into training, testing, and validation sets. In this test, the first 47 days of data were used as the training set to train stable feature embeddings. The remaining 8 days of midweek data were used as the testing set. Finally, 4 days of weekend data were used as the validation set to test the model's performance.

[0099] Some parameters in the network model of the present invention are set as follows: (1) In the causal scoring module, the number of neurons in each layer of the GCN neural network is set to [126, 64, 32], the number of neurons in each layer of the MLP neural network is set to [32, 1], and the hyperparameter ρ is set to 0.8. (2) In the heterogeneous feature extraction module, the number of neurons in each layer of the RGCN neural network is [300, 300, 300, 300, 300]. After generating the node representation, the corresponding number of neurons is [300, 300], and finally a projection representation with a dimension of 300 is generated for contrastive learning. (3) In the embedded contrastive learning module, the hyperparameter τ in the contrastive learning loss function is set to 0.1, and λ is set to 0.1.

[0100] This test uses the following three indicators: mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) to measure the performance of the model prediction. The relevant test results are shown in Table 1 below:

[0101] Table 1: Model performance comparison

[0102]

[0103] As shown in Table 1 above, the test results of this test give the original AGCRN model and the improved model of the present invention, and the MAE, RMSE and MAPE of the two are respectively at 15 minutes, 60 minutes and average. Although the effect of the correction of AGCRN by the network model of the present invention is relatively small in the short-term prediction of 15 minutes, the RMSE is improved by 28.6%, the MAE is improved by 22.8%, and the MAPE is improved by 34.04% in the long-term prediction of 60 minutes, and the effect is significantly improved. In summary, the graph feature extraction network model proposed in the present invention can be applied to different graph data processing neural network models. By combining the network model of the present invention as a priori with different spatiotemporal graph neural networks, the prediction performance of the corresponding graph neural network can be improved.

[0104] The present invention is not limited to the above-mentioned embodiments. Any obvious improvement, replacement or modification that can be made by those skilled in the art without departing from the essence of the present invention shall fall within the scope of protection of the present invention.

Claims

1. A method for extracting spatiotemporal graph features based on causal invariance, characterized by: The PeMS-04 traffic flow dataset is subjected to feature extraction using the following network model: it includes a causal scoring module and a heterogeneous feature extraction module. In the causal scoring module, each node in the spatiotemporal graph is scored for importance, and the spatiotemporal graph is sampled based on the score to obtain a core structure view and a complement view. In the heterogeneous feature extraction module, the sampled core structure view and complement view are embedded to obtain node embeddings for the core structure view and the complement view, respectively. The causal scoring module performs three samplings, namely, two core structure view samplings and one complement view sampling, wherein the core structure view sampling is: R(g)~P R (·|G=g) st|V R |=ρ·|V| The complement view sampling is: C(g)~P C (·|G=g) s.t.|V C |=ρ·|V| The above R(g) represents the core structure view, C(g) represents the complement view, and P R (·|G=g) represents the probability distribution of the core structure in the spatiotemporal graph g, P C (·|G=g) represents the probability distribution of complement, V R Represents the node set of the core structure R(g), V C represents the node set of the complement set C(g), V represents the node set of the spatiotemporal graph g, and ρ is a hyperparameter (0, 1); The probability distribution of the core structure R(G) in the space-time graph G=g is: The probability distribution of the complement C(G) is: Where p(v|g) is the importance score of node v, indicating the probability that node v is included in the core structure R(g); 1-p(v|g) is the unimportance score of node v, indicating the probability that node v is not included in the core structure; a node is considered a key node when it is sampled into the core structure view, otherwise it is considered a non-key node; based on the different types of nodes at both ends, there are four types of edge relationships between the two nodes; In the heterogeneous feature extraction module, the node information representation vector and the edge information representation vector of each view are first dimensionally expanded through a feedforward network. Then, each view is input into a GNN encoder to obtain a node representation. Finally, the obtained node representation is input into a heterogeneous graph neural network (RGCN). RGCN is used to associate the node attribute score vector P to generate each node embedding. The network model also includes an embedding contrastive learning module; the node embeddings of the core structure view and the node embeddings of the complement view obtained in the heterogeneous feature extraction module are mapped to obtain respective projection representations, and the embedding contrastive learning module performs node contrastive learning on the projection representations to train the network model; the embedding contrastive learning module is provided with an objective function: Where λ is the weight coefficient; Loss function l su (g) is: Loss function l in (g) is: Where τ is a normalized hyperparameter. The different node embeddings of the same node under the two core structure views are regarded as a pair of positive sample pairs. The corresponding projection representations of the two node embeddings in the positive sample pair are recorded as and The remaining nodes in the two core structure views except the positive samples are embedded as negative samples, and the projection representation of the negative samples is denoted as r - , The projection representation r of the negative sample - C is the set composed of the projection representation c of the complement view node.

2. The method for extracting spatiotemporal graph features based on causal invariance according to claim 1, characterized in that: The causal scoring module is equipped with a core structure generator network r(·) to perform node importance scoring. The r(·) is an encoder of the GNN-MLP combination. The node features and edge features of the spatiotemporal graph g are input into r(·) to generate a normalized node attribute score vector P. The vth element in the score vector P corresponds to the score p(v|g) of the node v.

3. The method for extracting spatiotemporal graph features based on causal invariance according to claim 1, characterized in that: The dimension expansion is: in is the node information embedding vector, is the side information embedding vector, x v is the node information representation vector, x e is the side information representation vector, W v and W e x v and x e The corresponding weight matrix.

4. The method for extracting spatiotemporal graph features based on causal invariance according to claim 3 is characterized in that: The GNN encoder generates a node representation as: Where σ is the activation function, is the node representation of node i in the lth layer, is the node representation of the l+1th layer of node i, is the node representation of node j at layer l, is the set of neighbor nodes that have k types of edges with node i, K is the set of all edge relationships, h e,j is the edge information embedding vector of node j, is the weight matrix of the lth layer of the k-type edge relationship, is the weight matrix of node i itself in layer l.

5. The method for extracting spatiotemporal graph features based on causal invariance according to claim 4 is characterized in that: The node representation of the core structure view and the node representation of the complement view are input into the heterogeneous graph neural network RGCN respectively, and the node embedding x of the core structure view is obtained accordingly. R and the node embedding x of the complement view C ; Then the projection q(·) is used to embed the above nodes into x R and x C Mapping is performed to generate a projection representation r of the core structure view node and a projection representation c of the complement view node respectively; the q(·) is a multi-layer perceptron MLP with L2 normalized output.