CN-122021860-A - Dynamic causal space-time prediction method for confounding factor perception
Abstract
The invention discloses a dynamic causal space-time prediction method for clutter perception, which comprises the steps of collecting space-time observation data of a target system, constructing space-time diagram data, setting input sequence length and target prediction sequence length, constructing an input data sequence and a corresponding target data sequence from the space-time data through a sliding window, constructing a structural causal discovery model based on a vector autoregressive model, reversely analyzing parameters of a one-dimensional CNN model by taking the input data sequence as input to output the target data sequence to obtain a causal structure matrix, constructing a joint loss function to train the structural causal discovery model and the one-dimensional CNN model to obtain an optimized causal structure matrix, taking the causal structure matrix and the input data sequence obtained by training as input to train a space-time prediction model, and outputting a predicted data sequence and a causal structure by using the space-time prediction model in a prediction stage. The method can provide clear basis for tracing the prediction result and meet the interpretable demand of urban decision on the support information.
Inventors
- WU JUNJIE
- LIN HAO
- Yu Jiazhou
- ZHAI SHUJIE
Assignees
- 北京航空航天大学
Dates
- Publication Date
- 20260512
- Application Date
- 20250926
Claims (8)
- 1. A confounding factor aware dynamic causal spatiotemporal prediction method, comprising: S1, acquiring space-time observation data of a target system, wherein the space-time observation data comprises node characteristics, time sequences, space adjacency relations and domain knowledge, preprocessing the data to construct space-time diagram data, setting the length of an input sequence and the length of a target prediction sequence, and constructing the input data sequence and a corresponding target data sequence from the space-time data through a sliding window; S2, constructing a structural causal discovery model X pred =WX hist based on a vector autoregressive model, wherein X hist is an input data sequence, X pred is a predicted data sequence, and W is a causal structure matrix; s3, constructing a joint loss function, training a structural causal discovery model and a one-dimensional CNN model to obtain an optimized causal structural matrix W, wherein the joint loss function comprises directed acyclic graph constraint loss, domain knowledge constraint loss, L1 norm sparsity constraint loss, causal structure figure KL divergence constraint loss and prediction error loss of a predicted data sequence and a target data sequence; And S4, training the space-time prediction model by taking the W and input data sequences obtained by training as input, and outputting a predicted data sequence and a causal structure by utilizing the space-time prediction model obtained by training in a prediction stage.
- 2. The method of claim 1, wherein n independent one-dimensional CNN models are constructed, each one-dimensional CNN model takes X hist as input to output a target data sequence, n reference causal structure matrixes W i are obtained by back-pushing the n one-dimensional CNN models through parameter analysis, i=1 to n, n is an integer greater than 1, and a final causal structure matrix W is obtained by weighted average of W i .
- 3. The confounding factor aware dynamic causal spatiotemporal prediction method of claim 2, wherein the formula for the joint loss function loss is as follows: ; loss square is a prediction error loss, Wherein For the target value to be a target value, Is a predicted value; loss DAG is a directed acyclic graph constraint loss, , wherein, W i is the ith reference causal structure matrix, h (W i ) is the W i directed acyclic index, tr (right) is the operator of the matrix trace, And Is a super parameter, d is the dimension of the matrix; loss PK is a domain knowledge constraint loss, Wherein cosSim (-) is a cosine similarity calculation formula, and W PK is a domain knowledge matrix; loss L1norm is the L1 norm sparsity constraint penalty, Wherein W i is the ith reference cause and effect structure matrix; loss KL is a causal structure chart KL divergence constraint loss, Wherein, the W k is the kth reference causal structure matrix, and the calculation formula of P t is the same as that of P k .
- 4. The confounding factor-aware dynamic causal space-time prediction method of claim 2, wherein the attention weights a i corresponding to the n reference causal structure matrices W i one by one are dynamically generated by an attention weight calculation module based on X hist , wherein the attention weight calculation module is composed of a fully connected layer, and the input of the attention weight calculation module is a time sequence abstract feature vector obtained by global average pooling of X hist ; The attention weight calculation module and the one-dimensional CNN model are optimized together through a joint loss function in the training process.
- 5. The confounding factor aware dynamic causal spatiotemporal prediction method of claim 3, wherein the method of constructing the domain knowledge matrix W PK comprises: defining a group of attribute characteristics for nodes in the space-time diagram data based on the prior knowledge of the field, wherein the attribute characteristics comprise node types, physical attributes and spatial position relations; According to the attribute characteristics, calculating the prior association strength between any two nodes to form an original prior association matrix A; Introducing a learnable parameterized transformation matrix T, and mapping an original prior correlation matrix A into a final domain knowledge matrix W PK ,W PK =sigma (T (E) A), wherein sigma represents the Hadamard product of the matrix, and sigma is a sigmoid activation function; The parameterized transformation matrix T is optimized together with the structural causal discovery model and the one-dimensional CNN model.
- 6. A confounding factor aware dynamic causal spatiotemporal prediction method as claimed in claim 3, wherein the spatiotemporal prediction model comprises an input layer, a plurality of cascaded causal enhancement spatiotemporal blocks, an output layer and a causal structure decoder; The input layer is used for receiving an input data sequence X hist and an optimized causal structure matrix W; Each causal enhancement space-time block comprises a causal enhancement graph convolution module and a time sequence convolution module, wherein the causal enhancement graph convolution module takes an optimized causal structure matrix W as one of graph adjacency matrixes, and fuses the causal enhancement graph convolution module with a static adjacency matrix constructed based on a space adjacency relation, so as to carry out graph convolution operation on input features, and capture the space association and causal dependence among nodes at the same time; The time sequence convolution module is used for extracting the time dimension characteristics from the space output by the causal enhancement chart convolution module; An output layer for mapping the output of the last causal enhancement spatio-temporal block to a predicted data sequence; And the causal structure decoder is used for inputting intermediate features output by all causal enhancement graph convolution modules in all N causal enhancement space-time blocks, and reconstructing a causal structure diagram consistent with the dimension of the optimized causal structure matrix W by aggregating the intermediate features to serve as a causal structure output by a prediction stage.
- 7. The confounding factor-aware dynamic causal spatiotemporal prediction method of claim 6, wherein a static adjacency matrix a static is constructed based on spatial adjacency and symmetric normalization processing is performed on a static ; Carrying out global average pooling on the current input to obtain a feature abstract vector of each node, inputting the feature abstract vector into a multi-layer perceptron, and outputting a gating coefficient vector gamma corresponding to the number of the nodes, wherein the fusion weight between the static adjacency and the causal dependency of each element node is obtained, and the static adjacency matrix A static and the causal structure matrix W are subjected to weighted fusion by using the gating coefficient vector gamma to generate a causal enhancement adjacency matrix A fused , wherein the calculation formula is as follows: A fused =γ◦A static +(1-γ)◦W Wherein, the bridge represents the Hadamard product of the matrix; The A fused is used as an adjacency matrix of graph convolution operation, and the graph convolution operation adopts a graph attention network mechanism, and specifically comprises the steps of calculating attention coefficients according to node characteristics of each node pair, multiplying the attention coefficients by corresponding elements in a causal enhancement adjacency matrix A fused to obtain final message transmission weight, carrying out weighted aggregation on characteristics of neighbor nodes based on the message transmission weight, and updating characteristic representation of a current node to serve as output of a causal enhancement graph convolution module.
- 8. The confounding factor aware dynamic causal spatiotemporal prediction method of claim 6, wherein the spatiotemporal model training method comprises: fixing the optimized causal structure matrix W, and training only the learnable parameters except the causal structure decoder in a space-time prediction model, wherein the training goal of the stage is to minimize the prediction error loss between a predicted data sequence and a target data sequence; The fixation of W is released, the W and all parameters of the space-time prediction model are trained together, and the training objective function is L total ,L total =Loss prediction +λLoss consistency ; Where Loss prediction is the prediction error Loss, loss consistency is the causal structural consistency Loss, λ is the hyper-parameter, and weights used to balance the two losses.
Description
Dynamic causal space-time prediction method for confounding factor perception Technical Field The invention relates to the field of intelligent cities, causal inference and artificial intelligence intersection. More particularly, the present invention relates to a confounding factor aware dynamic causal spatiotemporal prediction method. Background With the advent of the big data age, the traditional city management means and mode can not meet the requirements of modern city management, so that the development of intelligent models by using big data and artificial intelligence technology to assist city management and decision becomes a key problem to be solved urgently. The development of the Internet of things technology enables urban space-time observation data to present multi-source heterogeneous characteristics, and how to identify variable causal structures from massive dynamic data and improve prediction accuracy becomes a key support for intelligent decision. In a space-time prediction scenario, causal relationships between nodes are dynamically changed by interference from unobserved confounding factors. While the traditional linear regression method relies on a stationarity assumption, the deep learning model can capture a nonlinear relation, but the confounding factor is regarded as a static hidden variable, and the nonlinear relation tends to change radically along with the change of time or space, so that the prediction result is insufficient in robustness under a distributed offset scene. The depth model acts as a black box model, and its prediction results lack interpretability, which results in insufficient support information in the city decision process. Under different space-time fields, the method often has prior knowledge specific to the field, such as road structures, wind speeds, wind directions and the like, and when the current depth model is combined with the knowledge of the field, the model design is often highly coupled with the knowledge of the specific field, and the method cannot be applied to other fields and lacks the problem of universality. Therefore, there is a need to design a solution that overcomes the above drawbacks. Disclosure of Invention The invention aims to provide a dynamic causal space-time prediction method for confounding factor perception, which can provide clear basis for tracing prediction results and meet the interpretable requirement of urban decision on supporting information. To achieve these objects and other advantages and in accordance with the purpose of the invention, as embodied and broadly described herein, the present invention provides a dynamic causal spatiotemporal prediction method for confounding factor perception, comprising the steps of S1, collecting spatiotemporal observation data of a target system, including node characteristics, time sequences, spatial adjacency and domain knowledge, preprocessing the data to construct spatiotemporal map data, setting an input sequence length and a target prediction sequence length, constructing an input data sequence and a corresponding target data sequence from the spatiotemporal data through a sliding window, S2, constructing a structural causal discovery model X pred=WXhist based on a vector autoregression model, wherein X hist is the input data sequence, X pred is the prediction data sequence, W is a causal structure matrix, constructing a one-dimensional CNN model, inputting the one-dimensional CNN model with X hist as an input, outputting the target data sequence, reversely resolving the parameters of the one-dimensional CNN model to obtain a causal structure matrix W, S3, constructing a joint loss function, training the causal loss model and the causal structure model to obtain an optimized causal structure matrix W, wherein the joint loss function comprises a causal constraint loss map, a causal loss constraint loss L1, a causal loss model, a causal constraint sequence, a causal loss model and a causal prediction model, and a model output model, and a causal structure loss 4 as a training model, and a model input to the model output the causal structure loss. Further, constructing n independent one-dimensional CNN models, wherein each one-dimensional CNN model takes X hist as input to output a target data sequence, respectively and reversely pushing the n one-dimensional CNN models through parameter analysis to obtain n reference causal structure matrixes W i, wherein i=1 to n, n is an integer larger than 1, and carrying out weighted average on W i to obtain a final causal structure matrix W. Further, the formula of the joint loss function loss is as follows: ; loss square is a prediction error loss, WhereinFor the target value to be a target value,Is a predicted value; loss DAG is a directed acyclic graph constraint loss, , wherein,W i is the ith reference causal structure matrix, h (W i) is a W i directed acyclic index, tr (O.) is an operator for matrix trace, alpha and ρ are hyper-param