Dynamics prediction method based on interaction strength inference
Through the NSI-GEMP model and the global edge message passing mechanism, the interaction intensity in complex dynamic systems is dynamically inferred, which solves the problem of inaccurate capture of interaction intensity in the existing technology and achieves more accurate dynamics modeling and prediction.
Patent Information
- Application Number
- CN202410796594.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-27
AI Technical Summary
Existing technologies are difficult to accurately capture and predict the intensity of dynamic interactions in complex dynamic systems, especially in cross-time dimensions and global perspectives, causing the accuracy of dynamic predictions to be affected.
The NSI-GEMP model is proposed to dynamically infer the interaction intensity through joint training of the encoder and decoder, combined with the global edge message passing mechanism (GEMP) and time dependence, and introduce continuous weights in the decoder to reduce multi-step prediction errors.
It achieves precise modeling of the interaction structure between nodes in complex dynamic systems and improves the accuracy of dynamic prediction. It can adaptively capture interaction intensity during the time evolution process, improving the accuracy and generalization ability of prediction.
Smart Images

Figure CN118709541A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of complex dynamic systems in computers, and in particular relates to a dynamics prediction method based on interaction intensity inference. Background Art
[0002] Complex dynamic systems have a wide range of applications in the real world, including physical systems, multi-agent systems, biological systems, climate systems, etc. These systems involve complex dynamic interactions that constantly affect the states of their constituent nodes. However, due to certain specific reasons (such as the Hooke constant of the spring, the amount of charge, etc.), the interactions between nodes are not equally weighted. The evolution of complex dynamic systems can be viewed as the dynamic evolution of node dynamics based on the underlying weighted interaction structure. Identifying the underlying weighted interaction structure helps people understand dynamic systems, however, inferring interactions and learning dynamics from time series alone is a challenging inverse problem.
[0003] Interaction modeling has undergone a transition from implicit to explicit methods. Initially, implicit interactions were modeled through techniques such as message passing processes in GNNs or through attention mechanisms. However, implicit modeling cannot clearly capture the underlying interaction structure, cannot explicitly act on downstream dynamic prediction tasks, and lacks interpretability. The NRI model (Neural Relational Inference) has played an important role in explicitly modeling different types of latent interactions. It uses latent variables learned in the encoder as the interaction structure, which is then fed into the decoder to affect the prediction of the future state of the node. It infers interactions based on the assumption of keeping static. As a pioneer in explicitly inferring interactions using variational autoencoders (VAEs), NRI has inspired many subsequent works. For example, Webb et al. introduced a multi-level graph structure to classify different interactions, effectively reducing the number of joint representations required to capture diverse interaction types. Some works assume that there is a unique fixed underlying interaction structure and expand the node size to accommodate hundreds of nodes, but this assumption limits their applicability in practical scenarios. Alet et al. combined modular meta-learning with relational reasoning and used simulated annealing to identify the optimal interaction structure. Li et al. introduced structural priors into relational reasoning to further improve the modeling process. In addition, NRI-MPM introduced the spatiotemporal dependencies of nodes and edges for dynamic modeling, alleviating the error accumulation caused by multi-step prediction.
[0004] However, the interactions within the system can change over time, leading to the evolution of the system. Based on this foundation, dynamic neural relational inference (dNRI) simulates dynamic interactions, thereby eliminating the impact of NRI's strong assumptions on the prediction of node states in dynamic systems. Graber et al. and Li et al. extended the relational reasoning problem to dynamic processes, aiming to capture the process of evolution of interaction structures over time. Some deep learning models applied to trajectory prediction tasks also attempt to address the challenge of inferring interaction strength. These methods generally adopt mechanisms similar to GAT, such as GroupNet, which aggregates node features within hyperedges to estimate interaction strength. However, its definition of interaction strength is closer to the relative attention weights in GAT and may not be suitable for inferring absolute interaction strength. The most relevant work to the present invention is RAIN. However, RAIN mainly focuses on pairwise interactions and does not consider the contribution of surrounding neighbor nodes during the reasoning process. Therefore, it lacks an understanding of the global perspective of the interaction. Previous work is also limited to inferring interaction strength in static scenes. Summary of the invention
[0005] Previous works usually capture discrete interaction types or extract pairwise static interaction strengths, lacking more sophisticated interaction modeling and more detailed interaction capture across time dimensions. This makes it difficult to model the adaptive interaction strength evolution process of dynamic systems, and also affects the accuracy of downstream dynamics prediction tasks.
[0006] In order to solve the above problems, the present invention aims to reconstruct the interaction intensity structure from the historical observation trajectory of the node and predict the dynamics at the same time, and proposes the NSI-GEMP model. Taking into account the dynamic nature of the interaction between individuals in real scenarios, the present invention also derives a variant of the original model, DNSI-GEMP, which can dynamically and adaptively infer the interaction intensity over time. Finer-grained interaction modeling and more detailed interaction capture across time dimensions will undoubtedly enhance the accuracy of dynamics prediction. Since the state of each node is affected by the interaction of all other nodes in the system, the present invention proposes a new global edge message passing mechanism that can learn more accurate interaction representations from a global perspective.
[0007] A dynamic prediction method based on interaction strength inference of the present invention comprises the following steps:
[0008] 1) Constructing the NSI-GEMP model, including the following steps:
[0009] 1.1 The NSI-GEMP model is jointly trained by an encoder and a decoder: an encoder learns latent variable representation to infer interaction strength from the input history sequence; the other decoder predicts future states and trajectories based on the inferred interaction strength;
[0010] 1.2 Given a graph Its apex and edge e = (v, v′) ∈ ε, the encoder transforms the observed time series x = (x 1 ,…,x T ) as input, the purpose is to infer the absolute interaction strength between nodes; without the underlying interaction information about the nodes, the encoder uses a graph neural network (GNN) to propagate the historical sequence information of the nodes on the assumed fully connected structure. The specific process is expressed as:
[0011] h j,1 = femb(x j );
[0012]
[0013]
[0014] As shown in the formula, the time dimension of the node is first aggregated to obtain the node embedding h j,1 , and then the message passing process from node to edge v→e, and from edge to node e→v, aggregates the local and global information of the node through message passing, and finally obtains the edge embedding h (i,j),2 ;
[0015] 1.3 Establish a global edge message passing mechanism - GEMP, including the following steps:
[0016] In traditional graph neural networks (GNNs), the focus of message passing is mainly on modeling node features, while edge features are usually regarded as transient components obtained by connecting node features; therefore, the dependencies between edges are not effectively modeled. To address this limitation, this paper introduces a novel global edge message passing mechanism (GEMP) into the model; GEMP and NRI-MPM [3] The edge-to-edge message passing mechanism designed in GEMP is different from that designed in GEMP, where messages converge on the same node. By abandoning this mechanism, GEMP allows edge features to capture graph-wide dependencies, leading to improved edge embeddings. The motivation for this idea is that direct or indirect interactions between nodes all affect the evolution of node states. Inferring the strength of interactions between nodes requires the use of global interaction information present in the graph. The definition of GEMP is as follows:
[0017] e→e{e (i,j) :(v i ,v j )∈ε}=g e({h (i,j),2 :(v i ,v j )∈ε});
[0018] Where: g e represents the proposed message passing mechanism; specifically, the present invention adopts a multi-head self-attention mechanism to implement g e ; All edges are represented as To calculate the global attention between edges, the following formula is used:
[0019]
[0020] Where: m is the number of attention heads, e m is the attention score calculated using the dot-product attention mechanism;
[0021] 1.4 At the end of the encoder, the calculated multi-edge feature e is passed through a strength inference module m Concatenate them together and then pass through an output layer f reflect Extract explicit interaction strengths:
[0022] e=MLP([e 1 ,…,e m ]);
[0023] α=σ(f reflect (e));
[0024] Where: f reflect It is implemented by MLP and uses Sigmoid activation function to calculate the absolute interaction strength α. By using iterative message passing and subsequent self-attention calculation between edges, the edge embedding can more effectively capture the dependencies between interactions in the entire graph. This enhanced representation enables the model to learn more accurate latent variable representations, integrating comprehensive information about interactions within the graph.
[0025] 1.5 The decoder takes the current state of the node and the encoded interaction strength structure as input and predicts the Gaussian distribution of the future state, expressed as A decoder structure similar to that of NRI-MPM is adopted, with continuous weights α replacing discrete interaction types. During the decoding process, the decoder performs multi-step prediction to take into account the influence of interaction strength. It combines the spatial dependency obtained through message passing with the temporal dependency of nodes and edges to reduce the error accumulation in multi-step prediction. The decoding process is defined as follows:
[0026]
[0027]
[0028]
[0029]
[0030] in: and represents the current state of the node; the influence of the inferred strength is embedded in the message passing process to learn Then compare it with the current hidden state are input into the edge GRU unit together to combine it with the historical information of the edge; then Aggregated to Then input to the node GRU unit and combine with the node's historical information; use the future hidden state information By f out To predict changes in the current state, is the mean of the predicted future node states, σ 2 is expressed as variance;
[0031] 1.6 Combining prior information to assist in the inference of interaction strength. In complex dynamic systems, structural priors can help recover ground truth and reduce the potential search space for interaction strength inference. Prior information on edge types from previous studies can be extended to prior information on interaction strength, such as node sparsity, degree distribution of nodes and edges, and symmetry. Since the former two provide strong prior information, they may limit the generalization ability of the model. The soft symmetry constraint is incorporated into the loss of the model. The symmetry prior is defined as follows:
[0032] q′ θ (α (i,j) |x)=q θ (α (j,i) |x);
[0033]
[0034] Where: q θ (α (j,i) |x) is the inferred intensity distribution; q′ θ (α (i,j) |x) is q θ (α (j,i) |x)’s transposed distribution; Used to measure the difference between two distributions to achieve soft constraints on symmetry;
[0035] 1.7 Combining the loss of the symmetric prior term with other loss terms, the final loss function is defined as:
[0036]
[0037] Among them: the first term is the reconstruction loss term; calculate the distance between the predicted state and the true state, and β is the hyperparameter term;
[0038] 2) In many real scenarios, the interactions between individuals may change dynamically over time. To address this challenge, the present invention proposes to construct a dynamic version of DNSI-GEMP, including the following steps:
[0039] 2.1 Different from the previous embedding by aggregating the time dimension of nodes, here the node features are encoded at each time step, so that DNSI-GEMP can infer an interaction strength structure at each time step;
[0040] 2.2 Keep the time dimension in the calculation process, and obtain the edge embedding e through message passing and self-attention calculation in the encoding process t ;
[0041] 2.3 Use an LSTM block to capture the temporal dependency between interactions at different time steps, and then map the interaction strength α at each time step through the MLP layer. t :
[0042]
[0043] in represents the hidden state of the previous moment of propagation, f reflect is the MLP layer, σ is the activation function;
[0044] 2.4 During the decoding process, the input is transformed from the original fixed interaction strength to the interaction strength α at each moment t , this replacement allows the decoder to obtain edge embeddings that contain temporal dependencies The claims of the present invention are summarized as follows:
[0045] The present invention proposes the NSI-GEMP model, which realizes the function of inferring the interaction strength between individuals while realizing unsupervised dynamic prediction, and introduces its "dynamic version" DNSI-GEMP, which successfully captures the continuous, weighted, and evolving interactions between nodes that previous work could not capture, and realizes accurate dynamic modeling. At the same time, the present invention also proposes a novel global edge message passing mechanism, which integrates the interaction information in the entire graph, obtains the global dependency between interactions, and learns a more accurate representation of the interaction strength. Finally, the present invention also extends the structural priors of the interaction type to the priors of the interaction strength, successfully reducing the search space of the interaction strength and improving the prediction accuracy.
[0046] The beneficial effects of the present invention are: proposing a paradigm for inferring the interaction structure and dynamic modeling between nodes in complex dynamic systems that can be used in physical simulations and real-life scenarios, and experimentally proving the superiority of the present invention over other methods in inferring interaction structure and dynamic modeling. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A schematic diagram of the interaction strength structure between nodes inferred from the observable historical trajectories of nodes;
[0048] Figure 2 is a schematic diagram of the NSI-GEMP model;
[0049] Figure 3 Schematic diagram of the dynamic inference and prediction process of DNSI-GEMP. DETAILED DESCRIPTION
[0050] The NSI-GEMP model consists of two jointly trained components: an encoder that learns latent variable representations to infer interaction strengths from input history sequences, and a decoder that predicts future states and trajectories based on the premise of the inferred interaction structure. Figure 2 shown.
[0051] Given a graph Its apex and edge e = (v, v′) ∈ ε, the encoder transforms the observed time series x = (x 1 ,…,x T ) as input, the purpose is to infer the absolute interaction strength between nodes. Without the underlying interaction information about the nodes, we use graph neural network (GNN) to propagate the historical sequence information of nodes on the assumed fully connected structure. This process can be expressed as:
[0052] h j,1 =f emb (x j )
[0053]
[0054]
[0055] As shown in the formula, the time dimension of the node is first aggregated to obtain the node embedding h j,1 Then there is the message passing process from node to edge (v→e) and edge to node (e→v). The local and global information of the nodes are aggregated through message passing, and finally the edge embedding h is obtained. (i,j),2 .
[0056] Next, the new message passing mechanism proposed in the present invention is introduced. In traditional GNNs, the focus of message passing is mainly on modeling node features, while edge features are usually regarded as transient components obtained by connecting node features. Therefore, the dependencies between edges are not effectively modeled. To address this limitation, the present invention introduces a novel global edge message passing mechanism (GEMP) into the model. GEMP is different from the edge-to-edge message passing mechanism designed in NRI-MPM, where messages converge on the same node. By abandoning this mechanism, GEMP allows edge features to capture a comprehensive view of node interactions at the entire graph level, resulting in improved edge embedding. The motivation for this idea is that direct or indirect interactions between nodes all affect the evolution of node states. Inferring the strength of interactions between nodes requires utilizing the global interaction information present in the graph. The definition of GEMP is as follows:
[0057] e→e{e (i,j) :(v i ,v j )∈ε}=g e ({h (i,j),2 :(v i ,v j )∈ε})
[0058] g e Represents the proposed message passing mechanism. Specifically, the present invention adopts a multi-head self-attention mechanism to implement g e All edges in the graph are represented as To calculate the global attention between edges, the following formula is used:
[0059]
[0060] Where: m is the number of attention heads, and the scores are calculated using the dot-product attention mechanism. The calculated multi-head edge features are then concatenated and passed through the MLP to obtain the latent representation of the edge.
[0061] At the end of the encoder, we extract explicit interaction strength from latent edge features via a strength inference module:
[0062] e m =MLP([e 1 ,…,e m ])
[0063] α=σ(f reflect (e))
[0064] Where: f reflectImplemented by MLP. The present invention uses Sigmoid activation function to calculate the absolute interaction strength α. By using iterative message passing and subsequent self-attention calculation between edges, the resulting edge embedding can more effectively capture the dependencies between interactions in the entire graph. This enhanced representation enables the model to learn a more accurate latent variable representation, integrating comprehensive information about interactions within the graph.
[0065] Next is the introduction of the decoder part. The decoder takes the current state of the node and the encoded interaction strength structure as input and predicts the Gaussian distribution of the future state, expressed as The present invention adopts a decoder structure similar to NRI-MPM, but replaces the discrete interaction type with a continuous weight α. During the decoding process, the decoder performs multi-step prediction to take into account the influence of interaction strength. It combines the spatial dependency obtained through message passing and the temporal dependency of nodes and edges to reduce the error accumulation in multi-step prediction. The decoding process is defined as follows:
[0066]
[0067]
[0068]
[0069] in: and represents the current state of the node. The influence of the inferred strength is embedded in the message passing process to learn It is then fed into the edge GRU unit together with the current hidden state to combine it with the historical information of the edge. Aggregated to Then it is input into the node GRU unit and combined with the node's historical information. The present invention uses future hidden state information To predict changes in the current state. is the mean of the predicted future node states, σ 2 is expressed as variance.
[0070] The present invention also combines prior information to assist in the inference of interaction strength. In complex dynamic systems, structural priors can help recover ground truth and reduce the potential search space for interaction strength inference. Prior information on edge types from previous studies can be extended to prior information on interaction strength, such as node sparsity, degree distribution of nodes and edges, and symmetry. Since the first two provide stronger prior information, which may limit the generalization ability of the model, the present invention only incorporates soft symmetry constraints into the loss of the model. The symmetry prior is defined as follows:
[0071] q′ θ (α (i,j) |x)=qθ (α (j,i) |x)
[0072]
[0073] The inferred intensity distribution is denoted as q θ (α (j,i) |x), by introducing its transposed distribution q′ θ (α (i,j) |x), and use L1 distance to measure the difference between the two distributions as a symmetric loss.
[0074] Combining the loss of the symmetric prior term with other loss terms, the final loss function is defined as:
[0075]
[0076] Among them: the first term is the reconstruction loss term, which calculates the distance between the predicted state and the true state, and β is used as a hyperparameter term.
[0077] In many real-world scenarios, the interactions between individuals may change dynamically over time. To address this challenge, this paper proposes a dynamic version of the model, DNSI-GEMP. Unlike previous embedding by aggregating the time dimension of nodes, here the node features are encoded at each time step, so that DNSI-GEMP can infer an interaction strength structure at each time step, such as Figure 3 As shown in Figure 2, since the time dimension is retained during the calculation process, the edge embedding e is obtained through message passing in the encoding process and self-attention calculation. t , and finally a LSTM block is used to capture the temporal dependencies of different time steps; and then the interaction strength of each time step is obtained through MLP layer mapping:
[0078]
[0079] During the decoding process, the input is transformed from the original fixed interaction strength to the interaction strength α at each moment t This substitution allows the decoder to obtain edge embeddings that contain temporal dependencies
Claims
1. A dynamic prediction method based on interaction strength inference, characterized in that The following steps are involved: 1) Constructing the NSI-GEMP model, including the following steps: 1.1 The NSI-GEMP model is jointly trained by an encoder and a decoder: an encoder learns latent variable representation to infer interaction strength from the input history sequence; the other decoder predicts future states and trajectories based on the inferred interaction strength; 1.2 Given a graph Its apex and edge e = (v, v′) ∈ ε, the encoder transforms the observed time series x = (x 1 ,…,x T ) as input, the purpose is to infer the absolute interaction strength between nodes; without the underlying interaction information about the nodes, the encoder uses the graph neural network - GNN to propagate the historical sequence information of the nodes on the assumed fully connected structure. The specific process is expressed as: h j,1 =femb(x j ); As shown in the formula, the time dimension of the node is first aggregated to obtain the node embedding h j,1 , and then the message passing process from node to edge v→e, and from edge to node e→v, aggregates the local and global information of the node through message passing, and finally obtains the edge embedding h (i,j),2 ; 1.3 Establish a global edge message passing mechanism - GEMP, including the following steps: In traditional graph neural networks (GNNs), the focus of message passing is mainly on modeling node features, while edge features are usually regarded as transient components obtained by connecting node features; therefore, the dependencies between edges are not effectively modeled. To address this limitation, this paper introduces a novel global edge message passing mechanism, GEMP, into the model; GEMP and NRI-MPM [3] This is different from the edge-to-edge message passing mechanism designed in [15], where messages converge to the same node; by abandoning this mechanism, GEMP allows edge features to capture graph-wide dependencies, and by abandoning this mechanism, GEMP allows edge features to capture a comprehensive view of node interactions at the entire graph level, leading to improved edge embeddings; The motivation for this idea is that direct or indirect interactions between nodes all affect the evolution of node states. Inferring the strength of interactions between nodes requires the use of global interaction information in the graph. The definition of GEMP is as follows: e→e{e (i,j) :( i ,v j )∈ε}=g e ({h (i,j),2 :( i ,v j )∈ε}); Where: g e represents the proposed message passing mechanism; specifically, the present invention adopts a multi-head self-attention mechanism to implement g e ; All edges are represented as To calculate the global attention between edges, the following formula is used: Where: m is the number of attention heads, e m is the attention score calculated using the dot-product attention mechanism; 1.4 At the end of the encoder, the calculated multi-edge feature e is passed through a strength inference module m Concatenate them together and then pass through an output layer f reflect Extract explicit interaction strengths: e=MLP([e 1 ,…,e m ]); α=σ(f reflect (e)); Where: f reflect It is implemented by MLP and uses Sigmoid activation function to calculate the absolute interaction strength α. By using iterative message passing and subsequent self-attention calculation between edges, the edge embedding can more effectively capture the dependencies between interactions in the entire graph. This enhanced representation enables the model to learn more accurate latent variable representations, integrating comprehensive information about interactions within the graph. 1.5 The decoder takes the current state of the node and the encoded interaction strength structure as input and predicts the Gaussian distribution of the future state, expressed as A decoder structure similar to that of NRI-MPM is adopted, with continuous weights α replacing discrete interaction types. During the decoding process, the decoder performs multi-step prediction to take into account the influence of interaction strength. It combines the spatial dependency obtained through message passing with the temporal dependency of nodes and edges to reduce the error accumulation in multi-step prediction. The decoding process is defined as follows: in: and represents the current state of the node; the influence of the inferred strength is embedded in the message passing process to learn Then compare it with the current hidden state are input into the edge GRU unit together to combine it with the historical information of the edge; then Aggregated to Then input to the node GRU unit and combine with the node's historical information; use the future hidden state information By f out To predict changes in the current state, is the mean of the predicted future node states, σ 2 is expressed as variance; 1.6 Combining prior information to assist in the inference of interaction strength. In complex dynamic systems, structural priors can help recover ground truth and reduce the potential search space for interaction strength inference. Prior information on edge types from previous studies can be extended to prior information on interaction strength, such as node sparsity, degree distribution of nodes and edges, and symmetry. Since the former two provide strong prior information, they may limit the generalization ability of the model. The soft symmetry constraint is incorporated into the loss of the model. The symmetry prior is defined as follows: q′ θ (α (i,j) |x)=q θ (α (j,i) |x); Where: q θ (α (j,i) |x) is the inferred intensity distribution; q′ θ (α (i,j) |x) is q θ (α (j,i) |x)’s transposed distribution; Used to measure the difference between two distributions to achieve soft constraints on symmetry; 1.7 Combining the loss of the symmetric prior term with other loss terms, the final loss function is defined as: Among them: the first term is the reconstruction loss term; calculate the distance between the predicted state and the true state, and β is the hyperparameter term; 2) In many real scenarios, the interactions between individuals may change dynamically over time. To address this challenge, the present invention proposes to construct a dynamic version of DNSI-GEMP, including the following steps: 2.1 Different from the previous embedding by aggregating the time dimension of nodes, here the node features are encoded at each time step, so that DNSI-GEMP can infer an interaction strength structure at each time step; 2.2 Keep the time dimension in the calculation process, and obtain the edge embedding r through message passing and self-attention calculation in the encoding process t ; 2.3 Use an LSTM block to capture the temporal dependency between interactions at different time steps, and then map the interaction strength α at each time step through the MLP layer. t : in represents the hidden state of the previous moment of propagation, f reflect is the MLP layer, σ is the activation function; 2.4 During the decoding process, the input is transformed from the original fixed interaction strength to the interaction strength α at each moment t , this replacement allows the decoder to obtain edge embeddings that contain temporal dependencies
