A dynamic system relationship reasoning method based on bidirectional attention
Patent Information
- Application Number
- CN202610814038.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-08
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2046-06-08
AI Technical Summary
单向聚合割裂了节点接收与发送信息的内在因果联系,使其无法捕捉这种由反馈产生的关键特征,从而难以在长间隔采样下还原真实的物理耦合结构
(1)本发明提供了一个统一的框架,无需针对特定的图结构假设修改模型架构。无论是无向图还是有向图,无论是离散的无权图还是连续的加权图,本发明的关系推理模型(DARI)均能保持高保真的推断性能,具有强大的泛化能力与通用性。
Smart Images

Figure CN122334522B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence, deep learning and complex network modeling technology, and in particular to a dynamic system relation reasoning method based on bidirectional attention. Background Technology
[0002] Understanding the interaction structure between the components of a system (the interaction structure between nodes) is fundamental to analyzing dynamic systems in physics, biology, neuroscience, epidemiology, finance, and sociology. However, directly measuring this interaction structure in real systems is often costly or even infeasible, and local relationship patterns are often partially or completely unobservable. In contrast, dynamic observations are generally easier to obtain. Therefore, inferring the underlying interaction structure from observed dynamics in the absence of real network structures constitutes a highly challenging inverse problem. A dynamic system is a mathematical model describing the evolution of states (node characteristics) over time.
[0003] In recent years, relational reasoning methods have developed rapidly, gradually shifting from traditional statistical methods to machine learning paradigms. Classical methods characterize the similarity or dependency structure between node time series using statistical measures, and then map this to the probability of edges. These include Granger causality, mutual information, and transitive entropy. These methods have advantages such as strong interpretability and applicability to simple undirected or acyclic structures, but their static statistical characteristics face significant limitations when dealing with high-dimensional, nonlinear, and non-stationary dynamic processes.
[0004] Therefore, machine learning-based methods have gained widespread attention and demonstrated powerful capabilities in the joint modeling of complex dynamics and latent graph structures. Notably, the Neural Relational Inference (NRI) model, which combines variational autoencoders with graph neural networks (GNNs), was the first to propose a unified framework for simultaneously learning latent interaction graphs and system dynamics. Subsequently, a series of extensions have developed in multiple directions, including temporal graph modeling, efficient message passing and sparsity modeling (NRI-MPM), node heterogeneity modeling, separation of direct / indirect effects (GDP) based on dynamic priors, amortized causal discovery (ACD), weighted graph inference (RIVA), and multi-factor or meta-learning frameworks. These works collectively constitute the core system of neural relational inference methods.
[0005] Despite its rapid development, existing relational reasoning methods still face several key limitations.
[0006] First, most existing models are still constrained by the message-passing paradigm of GNNs, facing a dual bottleneck of computational efficiency and modeling depth. On the one hand, the reliance on expensive edge-wise computation results in significant resource overhead, greatly hindering the scaling of models to large-scale networks. On the other hand, GNNs, which focus on node aggregation, exhibit increasingly pronounced over-smoothing and gradient degradation as their depth increases, and their training process is highly sensitive to topology and hyperparameters, limiting their application in complex systems. In contrast, while Transformer-based methods circumvent some graph structure limitations, they often simplify the evolution of node trajectories into a general time series prediction task, neglecting the physical modeling of underlying fine-grained dynamic mechanisms, leading to limited inference accuracy.
[0007] Secondly, most existing models are designed for single interaction types or specific graph structure assumptions, lacking a unified generalization framework. Frameworks developed for unweighted graphs, when applied to weighted graphs, often rely on coarse discretization or simple weight embedding, weakening the essential differences in connection strength and multi-scale effects. Models specifically tailored for directed graphs often tightly couple directionality with parameterization, making it difficult to naturally transfer to undirected or bidirectional settings. Although some work attempts to alleviate these limitations, such as using meta-learning to build modular model libraries and managing complex relationships through factor graph decomposition, these strategies are essentially still indirect patching or decomposition approximation, failing to provide a unified modeling solution applicable to diverse interaction types. Furthermore, while generative model-based methods have been explored, they typically require independent solving of node connection patterns, resulting in extremely high computational costs.
[0008] Finally, existing models generally employ a unidirectional aggregation paradigm that gathers neighbor information to a central node. This design faces significant challenges when dealing with complex dynamics. On one hand, many complex dynamic systems require models to possess comprehensive perception capabilities, needing to both aggregate incoming neighbors to perceive external inputs and identify outgoing neighbors to infer external influences. This is particularly true in asymmetric topologies and scenarios involving bidirectional information flow, where a single receiving perspective leads to the loss of key interaction features. On the other hand, even in symmetric structures, because the observation sampling interval is typically longer than the actual physical iteration interval, perturbations emitted by a node can propagate to its neighbors and react back to itself, creating an echo effect. Unidirectional aggregation severs the inherent causal link between node receiving and sending information, making it impossible to capture these key features generated by feedback, thus hindering the reconstruction of the true physical coupling structure under long-interval sampling. Summary of the Invention
[0009] To overcome the shortcomings of the prior art, the present invention provides a dynamic system relation reasoning method based on bidirectional attention, which is used to infer the potential inter-node interaction structure in a dynamic system.
[0010] To achieve the above objectives, the present invention adopts the following technical solution, including: A dynamic system relation reasoning method based on bidirectional attention is proposed, which uses a relation reasoning model to infer the interaction structure between N nodes in a dynamic system; the dynamic system is a mathematical model describing the evolution of node states over time. The relational reasoning model includes a graph generator and a neurodynamic agent model; The graph generator is based on structural parameters Generate the interaction structure between nodes, and represent the interaction structure between nodes using an adjacency matrix A; The neurodynamic surrogate model Based on the trajectory data of the nodes Given an adjacency matrix A by the graph generator, the dynamic system is modeled using the observed node trajectory data; where, These are the model parameters for the neurodynamic proxy model; the neurodynamic proxy model is based on the bidirectional attention graph Transformer architecture. The training method for the relational reasoning model is as follows: a training graph generator generates an adjacency matrix A, while a neurodynamic agent model is trained in an unsupervised learning manner. The training objective of the relational reasoning model is to maximize the conditional likelihood of the observed node trajectory data given the adjacency matrix A. The total loss function of the relational reasoning model includes: a likelihood-based dynamic system prediction loss term, and a regularization term applied to the inferred interaction structure.
[0011] Preferably, for an unweighted graph, the graph generator generates the adjacency matrix A as follows: The graph generator assumes that the nodes are ordered pairs. There exists a binary interaction relationship, denoted as 'a'. , representing two relationship types: no interaction and interaction, respectively; the ordered pairs of nodes This represents a directed edge from node i to node j. No interaction indicates that the directed edge does not exist, and interaction indicates that the directed edge exists. For each node, ordered pairs That is, each directed edge is assigned two real-valued hidden variables. , representing the implicit scores of the probabilities of no interaction and interaction, respectively, and the nodes are ordered pairs. The interaction probability is obtained through the Softmax function: ; in, For nodes to be ordered Belongs to relation type The probability, This indicates no interaction. 1 indicates that there is interaction; It is a fixed inverse temperature parameter used to control the sharpness of the distribution; For node ordered pairs The trainable structural parameters; Softmax is the exponential normalization function; Structural parameters Ordered by each node Real-valued hidden variables Composition, graph generator based on structural parameters Generate ordered pairs of nodes The interaction probability is used to generate the adjacency matrix A, which is defined by the probability that there is an interaction between ordered pairs of nodes. edge weight .
[0012] Preferably, for a weighted graph, the graph generator generates the adjacency matrix A as follows: The graph generator will sort the nodes into pairs. The interaction relationships between nodes are represented by positive edge weights; the nodes are ordered pairs. This represents a directed edge from node i to node j. The larger the edge weight, the stronger the interaction relationship. ; For each node, ordered pairs That is, each directed edge is assigned a real-valued potential score. And the real-valued potential score is obtained through the Softplus function. Mapped to ordered pairs of nodes Edge weights: ; in, For node ordered pairs Edge weights; For node ordered pairs The trainable structure parameters; Softplus is the non-linear activation function: Structural parameters Ordered by each node Real-valued latent score Composition, graph generator based on structural parameters Generate ordered pairs of nodes The edge weights are determined to generate the adjacency matrix A.
[0013] Preferably, the trajectory data of the nodes ,in, The feature set of all nodes, i.e., N nodes, at time t; Represents the feature vector of node i at time t; i = 1, 2, ..., N; t = 0, 1, ..., T-1; The neurodynamic surrogate model captures historical trajectory data using a sliding window. Predicting the node state at the next moment using historical trajectory data ; This represents the window step size.
[0014] Preferably, the specific content of the neurodynamic surrogate model is as follows: The neurodynamic surrogate model consists of an input layer, a bidirectional attention module, a fusion module, a feedforward network, and an output layer. The processing procedure is as follows: S1, the input layer will input data. The features are concatenated along the feature dimension and transformed using a multilayer perceptron (MLP) to obtain the input features for the bidirectional attention module. ; S2, the processing procedure of the bidirectional attention module is as follows: S21, the bidirectional attention module includes K parallel attention heads, each attention head The processing procedure is as follows: Attention Input features Projecting each linear layer into a query item Key items and two numerical terms , : ; in, For attention head The projection matrix; k represents the k-th attention head, k=1,...,K; The attention score is calculated by scaling the dot product and then transformed using the Softplus function. ; in, For attention head Attention score; Softplus is a non-linear activation function: Let k be the feature dimension of the attention head; Each attention head It is decomposed into two branches with multiplicative masks: a forward mask branch and a reverse transpose mask branch. The forward masking branch is responsible for capturing the positive dependencies in the interaction structure, and converting the adjacency matrix... As a mask for attention score Perform the Hadamard product to obtain the masked attention matrix, and then aggregate the information to the target node through the incoming edges. The calculation method is as follows: ;in, The product of Hadamard; Features of the mask branch output; The inverse transpose mask branch is responsible for capturing the inverse dependencies in the interaction structure. It transposes the attention matrix after masking in the mask branch and aggregates the information to the target node through outgoing edges. The calculation method is as follows: ; Features of the transpose mask branch output; S22, the features output from the masked branches and transposed masked branches of the K parallel attention heads are processed by feature concatenation and linear transformation to generate positive and negative features respectively: ; ; in, Let be the projection matrix of the linear transformation. These are positive features and negative features, respectively; S3, the fusion module will integrate positive features Transpose feature and input features By splicing, the splicing features are obtained. ; S4, the feedforward network consists of two layers, and the calculation method is as follows: , ; in, This is the output of the first layer of the feedforward network. This is the output of the second layer of the feedforward network. It is a multilayer perceptron. This is the normalization function; S5, the output layer outputs the node state at the next time step. .
[0015] Preferably, the loss term is predicted based on likelihood-based dynamic system prediction. for: ; in, Let be the single-step conditional transition probability of the neurodynamic surrogate model, representing the neurodynamic surrogate model based on historical trajectory data. and adjacency matrix For the node state at the next time step The predicted probability; Represents historical trajectory data ; Apply a regularization term to the inferred interaction structure. For unweighted graphs, the KL divergence term between the predicted edge distribution and the sparse-induced prior is used as a regularization term; for weighted graphs, the inferred adjacency matrix is regularized. Regularization term; The total loss function of the relational reasoning model is: ; The training objective of the relational reasoning model is .
[0016] Preferably, assuming that the observations at each node follow a Gaussian distribution, minimizing the negative log-likelihood is transformed into minimizing the squared error loss, thereby... Transform into: ; in, Let be the feature vector of node j at time t+1; The mean of the distribution is generated by the neurodynamic surrogate model.
[0017] Preferably, the dynamic system is an infectious disease transmission model, where nodes are regions and node features are the number of infected people in each region; trajectory data of nodes is constructed based on the number of infected people in each region at each time; the trajectory data of nodes is input into the relational reasoning model, and a graph generator and a neural dynamics agent model are trained simultaneously; the trained graph generator is used to generate the interaction structure between nodes to obtain the interaction relationship between regions.
[0018] The present invention also provides a readable storage medium having a computer program stored thereon, which, when executed, implements the aforementioned method for reasoning about dynamic systems based on bidirectional attention.
[0019] The present invention also provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned dynamic system relation reasoning method based on bidirectional attention.
[0020] The advantages of this invention are: (1) This invention provides a unified framework that does not require modification of the model architecture for specific graph structure assumptions. Whether it is an undirected graph or a directed graph, whether it is a discrete unweighted graph or a continuous weighted graph, the relational reasoning model (DARI) of this invention can maintain high-fidelity inference performance and has strong generalization ability and versatility.
[0021] (2) The graph generator of the present invention takes into account the fact that the existence probability or weight of each edge in the relation inference task is independent of each other. It removes the Softmax normalization in the traditional attention calculation and uses the non-negativity-preserving activation function (Softplus) instead, thereby more accurately modeling the intensity of independent physical interactions.
[0022] (3) The neurodynamic agent model of this invention adopts a dual-attention mechanism and proposes a parallel attention architecture. Through forward masking attention and reverse transposed masking attention, it explicitly models the incoming and outgoing information flows of nodes simultaneously. This enables the model to capture the bidirectional dependency and feedback-driven characteristics in the dynamic system.
[0023] (4) The neurodynamics proxy model of this invention utilizes the Transformer architecture to shift the computational bottleneck from edge-by-edge MLP computation to node-level linear projection combined with matrix multiplication. This reduces the complexity of feature extraction from... Reduce to This greatly reduces memory consumption and training time, enabling efficient inference.
[0024] (5) This invention achieves general support for directed / undirected and weighted / unweighted graphs within a single model through learnable attention weights and an adaptive graph generator.
[0025] (6) By introducing a bidirectional attention mechanism, this invention can simultaneously capture information dependencies in both the in-degree and out-degree directions, effectively solving the problem of existing models neglecting reciprocal effects. Experiments show that in various complex systems (including chaotic and nonlinear systems) such as Kuramoto, Springs, and FJ dynamics, this method significantly outperforms baseline models (such as NRI, GDP, and RIVA) in terms of structure recovery (AUC / PCC index) and state prediction accuracy.
[0026] (7) This invention breaks away from the expensive edge-by-edge computation paradigm. As the node size increases, the memory usage and training time only show a linear or optimized low growth trend. Experimental data shows that in a 200-node network, the memory usage of this invention is only about 1 / 13 of that of the traditional NRI model, and the training speed is improved by about 20 times, enabling it to handle large-scale networks and possessing extremely high computational efficiency and scalability.
[0027] (8) In the face of different network topologies (such as uniform ER random graphs and heterogeneous BA scale-free networks) and sparse data (few trajectories), the present invention can still maintain stable high performance, overcome the performance degradation problem that traditional GNN models are prone to in complex topologies, and has strong robustness. Attached Figure Description
[0028] Figure 1 This is an architectural diagram of the relational reasoning model of the present invention.
[0029] Figure 2 This is a comparison chart of efficiency analysis for Example 1.
[0030] Figure 3 This is a comparison chart of the inference results for Example 2. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] The underlying inter-node interaction structure is crucial for understanding dynamical systems, but it is often difficult to observe directly in reality, making relation inference based solely on observed dynamics a highly challenging inverse problem. Existing methods are mainly limited by a unidirectional aggregation paradigm, focusing only on the convergence of incoming edge information while neglecting the crucial role of outgoing edge influences in dynamic evolution. This limitation severs the inherent causal relationship between node receiving and sending information, causing models to fail to capture the inherent bidirectional coupling and feedback-driven characteristics of complex dynamics, thus severely restricting their modeling capabilities. Furthermore, the dependence of existing models on expensive edge-level computations also hinders their scalability on large networks.
[0033] In summary, the existing relation inference paradigm has at least three main areas for improvement: Dynamics modeling capability and computational efficiency: There is an urgent need for a mechanism that can balance computational scalability and fine-grained dynamics modeling. This mechanism must overcome the limitations of traditional graphical models in terms of efficiency and training, while also compensating for the lack of physical evolution principles in general sequence models.
[0034] Interaction types and graph structures: It is necessary to establish a unified framework that can flexibly accommodate directed, undirected, weighted, unweighted and multiple relation settings, breaking the limitations of the single graph structure assumption, so as to enhance the generalization ability of the model in diverse interaction modes.
[0035] Message passing mechanism: It is necessary to break through the limitations of the one-way aggregation paradigm and construct a bidirectional information flow mechanism that explicitly includes the perspectives of sending and receiving, so as to accurately capture the inherent bidirectional coupling characteristics and echo feedback effect under long-interval sampling in complex dynamic interactions.
[0036] To this end, the present invention designs a relational reasoning model for inferring the interaction structure (i.e., the connection relationship between nodes) between all nodes in a dynamic system.
[0037] The input to the relational reasoning model is trajectory data of N nodes. ;in, Let N be the feature set of N nodes at time t; Let i represent the feature vector of node i at time t, where i = 1, 2, ..., N, and t = 0, 1, ..., T-1.
[0038] like Figure 1 As shown, the relational reasoning model consists of two jointly trained parts: a graph generator based on trainable structural parameters. Generate the interaction structure between nodes and represent the interaction structure using an adjacency matrix A; and a neurodynamic surrogate model. Based on the trajectory data of the nodes Given an adjacency matrix A by the graph generator, the dynamic system is modeled; where, These are the model parameters for the neurodynamic surrogate model. Figure 1 (a) in the text represents the relational reasoning process. Figure 1 (b) in the diagram represents the processing procedure of the neurodynamic surrogate model.
[0039] The training method for the relational reasoning model is as follows: a training graph generator generates an adjacency matrix A, while a neurodynamic agent model is trained in an unsupervised learning manner.
[0040] The following section provides a detailed explanation of each part of the relational reasoning model.
[0041] 1. Graph Generator Graph generators encode unknown interaction structures into a set of trainable structural parameters. And map it to an adjacency matrix It adopts a non-amortized setting and does not use an encoder network. That is, it does not predict edges from the data in real time, but directly optimizes the trainable parameters (structural parameters) associated with each edge together with the neurodynamic surrogate model.
[0042] (1) For an unweighted graph, the graph generator generates the adjacency matrix A as follows: The graph generator assumes that the nodes are ordered pairs. There exists a binary interaction relationship, denoted as 'a'. , representing two relationship types: no interaction and interaction, respectively; ordered pairs of nodes This represents a directed edge from node i to node j. No interaction indicates that the directed edge does not exist, and interaction indicates that the directed edge exists. For each node, ordered pairs That is, each directed edge is assigned two real-valued hidden variables. , Let be the trainable structure parameters, and represent the latent scores for the probabilities of edges not existing and existing (no interaction and interaction), respectively. Nodes are ordered pairs. The interaction probabilities are obtained using a temperature-controlled Softmax function: ; in, It is a fixed inverse temperature parameter used to control the sharpness of the distribution, as... As the number of edges increases, their distribution becomes sharper and gradually converges to deterministic interaction relationships. For nodes to be ordered Belongs to relation type The probability, This indicates no interaction. 1 indicates that there is interaction; For node ordered pairs The trainable structural parameters are real-valued latent variables, often referred to as unnormalized scores in deep learning; Softmax is the exponential normalization function. Then, the inferred adjacency matrix A is defined by the probability (a=1) of interactions between ordered pairs of nodes, such that the ordered pairs of nodes... edge weight .
[0043] In the graph generator, for unweighted graphs, the structural parameters... Ordered by each node Real-valued hidden variables Composition, graph generator based on structural parameters Generate ordered pairs of nodes The interaction probabilities are used to generate the adjacency matrix A.
[0044] (2) For a weighted graph, the graph generator generates the adjacency matrix A as follows: The graph generator will sort the nodes into pairs. The interaction between them is represented by positive continuous strength (continuous edge weight).
[0045] For each node, ordered pairs That is, each directed edge is assigned a real-valued potential score. And the real-valued potential score is obtained through the Softplus function. Mapped to non-negative edge weights: ; in, For node ordered pairs Edge weights; For node ordered pairs The trainable structural parameters are real-valued latent variables, often referred to as unnormalized scores in deep learning; Softplus is a non-linear activation function, Softplus(x) = ln(1 + e^(-x)). x ).
[0046] In the graph generator, for a weighted graph, the structural parameters... Ordered by each node Real-valued latent score Composition, graph generator based on structural parameters Generate ordered pairs of nodes The edge weights are determined to generate the adjacency matrix A.
[0047] The above construction can also be naturally extended to multi-relation scenarios: multiple potential scores can be assigned to each edge, and a Softmax mapping can be used for discrete relation types, while independent Softplus mappings can be used for multiple continuous channels. In all cases, the graph generator is an adjacency matrix. It provides a flexible form of parameterization, which allows it to directly support accurate reconstruction of dynamic systems through optimization.
[0048] 2. A neurodynamic surrogate model based on bidirectional attention graph Transformer Bidirectional attention graph Transformer architecture, such as Figure 1 As shown in (b), the architecture is designed as a neurodynamic agent model. Its core objective is to efficiently model dynamic systems while integrating and evaluating potential interaction structures (i.e., adjacency matrix A). Through its unique bidirectional attention mechanism, the neurodynamic surrogate model... It can comprehensively capture the bidirectional, causal dependencies between nodes from the observed trajectory data x, thereby more accurately predicting the behavior of the dynamic system and inferring the underlying interaction structure.
[0049] Neurodynamic surrogate model Designed to capture historical trajectory data using a sliding window Thus, the distribution is approximated by the transition. Its input is from Time's up Historical trajectory data of N nodes captured at any given time , represented as Predicting the node state at the next moment using historical trajectory data , This represents the window step size.
[0050] The neurodynamic surrogate model consists of an input layer, a bidirectional attention module, a fusion module, a feedforward network, and an output layer. The processing procedure is as follows: S1, In order to map the input trajectory data state to a high-dimensional feature space suitable for Transformer processing, the input layer processes the input data. The features are concatenated along the feature dimension and transformed using a multilayer perceptron (MLP) to obtain the input features H of the dual-attention module: ; in, This represents feature concatenation, where N is the number of nodes. Let be the dimension of the hidden layer.
[0051] S2, in order to achieve comprehensive capture of asymmetric and bidirectional dependencies in the interaction structure, a bidirectional attention module is designed. The adjacency matrix A generated by the graph generator to represent the interaction structure is used as the attention mask. Two complementary attention matrices are used in parallel. By comparing and fusing positive and negative attention features, the representation ability of the neurodynamic agent model is enhanced.
[0052] The processing procedure of the bidirectional attention module is as follows: S21, the bidirectional attention module includes K parallel attention heads, each attention head The processing procedure is as follows: Attention Input features Each query term is projected onto a linear layer. Keys And two sets of numerical items (Values) , : ; in, For attention head The learnable projection matrix (linear layer parameters) is in the matrix; k represents the k-th attention head, k=1,...,K; Softplus is the non-linear activation function. Let be the dimension of the k-th attention head.
[0053] The attention score is calculated by scaling the dot product and then transformed using the Softplus function. ; in, For attention head Attention score.
[0054] This invention does not apply the softmax function to the attention score. Since each interaction is an independent distribution, and the probability strength of each interaction in the entire system is independent, this invention abandons the softmax function used for probability normalization and adopts... The function guarantees the non-negativity of the weights.
[0055] Each attention head It is decomposed into two branches with multiplicative masks: a forward mask branch and a reverse transpose mask branch. The forward masking branch is responsible for capturing the positive dependencies in the interaction structure, and converting the adjacency matrix... As a mask for the original attention score Perform the Hadamard product to obtain the masked attention matrix, and then aggregate the information to the target node through the incoming edges. The calculation method is as follows: ;in, The product of Hadamard; Features of the mask branch output; The inverse transpose mask branch is responsible for capturing the inverse dependencies in the interaction structure. It transposes the attention matrix after masking in the mask branch and aggregates the information to the target node through outgoing edges. The calculation method is as follows: ; This is a characteristic of the output of the transpose mask branch.
[0056] S22, the features output from the masked branches and transposed masked branches of the K parallel attention heads are processed by feature concatenation and linear transformation to generate positive and negative features respectively: ; ; in, These are positive features and negative features, respectively; Let be the projection matrix of the linear transformation. Indicates feature splicing, For linear transformation dimensions.
[0057] S3, the fusion module combines the original input features H and the forward branch features. Reverse branch features After splicing, the splicing features are obtained. .
[0058] S4, the feedforward network (FFN) consists of two layers, and the calculation method is as follows: , ; in, This is the output of the first layer of the feedforward network. This is the output of the second layer of the feedforward network. It is a multilayer perceptron. For normalization function, S5, the output layer outputs the node state at the next time step. .
[0059] 3. Training Objectives and Optimization of Relational Reasoning Models The comprehensive training objective of the relational reasoning model is to simultaneously optimize two independent but essentially tightly coupled components (graph generator and neurodynamic agent model). The total loss function includes: a likelihood-based dynamic system prediction loss term and a regularization term imposed on the inferred interaction structure.
[0060] (1) Considering that the input trajectory data (sequence data) satisfies the Markov property assumption, the trajectory likelihood can be decomposed in the time dimension as follows: ; In the formula, These are the model parameters for the neurodynamic surrogate model; Given an adjacency matrix The joint likelihood of the observed trajectory is the total probability of observing the node trajectory data x (continuous state data) under the current adjacency matrix A assumption. Let be the single-step conditional transition probability of the neurodynamic surrogate model, representing the neurodynamic surrogate model based on historical trajectory data. and adjacency matrix For the node state at the next time step The predicted probability; Represents historical trajectory data ; The window step size for capturing historical trajectory data for the neurodynamic surrogate model; This represents the multiplication of probabilities at each step of a time series, combining local single-step predictions into an evaluation of the entire global trajectory.
[0061] The training objective of the neurodynamic surrogate model is to maximize the likelihood of the observed node trajectory data under the adjacency matrix A, i.e.: ; Loss Term Prediction Based on Likelihood of Dynamic Systems for: ; In practical modeling, it is assumed that the observations of each node follow a Gaussian distribution: ; in, Let be the feature vector of node j at time t+1, and the mean of this distribution. Generated by a bidirectional attention map Transformer (neurodynamic surrogate model) and directly used as the model's predicted output; while For a pre-defined fixed noise variance hyperparameter, It is a unit vector.
[0062] Therefore, minimizing the negative log-likelihood (NLL) can be directly transformed into minimizing the squared error loss, which is a more computationally feasible alternative. Transform into: ; This is the likelihood-based dynamics prediction loss term, which measures the degree of agreement between the predicted dynamics and the observed data.
[0063] (2) In order to effectively regularize the graph structure and avoid the phenomenon that the log activation values collapse into an overly sparse or degenerate structure too early in the training period, a structure regularization term customized for a specific graph modality is introduced. Specifically, For unweighted graphs where edges are modeled as discrete latent variables, the predicted edge distribution is used. With sparsity-induced priors KL divergence terms between As a regularization term, it is expressed through a KL divergence term. This encourages the inferred edge distribution to remain close to a uniform distribution, thereby maximizing its Shannon entropy: ; For a weighted graph involving continuous interaction strength, apply an algorithm to the inferred adjacency matrix A. Regularization terms to facilitate the generation of sparse connection patterns: ; By minimizing This can prevent the model from overfitting to spurious correlations while maintaining structural sparsity consistent with real physical systems.
[0064] (3) After combining these two core components (graph generator and neurodynamic surrogate model), the structural parameters (Log activation values used for parameterized interaction structures) and model parameters of neurodynamic surrogate models The common training objective is: ; The training objective is optimized using joint gradient descent with the Adam optimizer and for structural parameters. With model parameters Different learning rates are set for each. Furthermore, the Gumbel-Softmax technique is used during forward propagation to obtain a differentiable soft adjacency matrix. This enables end-to-end joint optimization of interactive structures and dynamics.
[0065] Because this dual optimization strategy is strictly implemented during training, gradients are simultaneously backpropagated to the model parameters. and structural parameters This allows the neurodynamic agent model and the underlying interaction structure to dynamically correct each other and improve together during the training process.
[0066] 4. Complexity Analysis and Discussion of Relational Reasoning Models A comparative analysis of the computational complexity of the neurodynamic agent in the proposed relational reasoning model (DARI) framework and the neurodynamic agent models used in standard relational inference baselines (e.g., the message-passing neural network MPNN used in NRI) is conducted.
[0067] The bottleneck of baseline methods: edge-centric computation. Traditional relational reasoning methods typically employ message-passing neural networks (MPNNs), whose core operation constructs edge features by concatenating the representations of source and target nodes. In inference tasks where the underlying interaction structure is unknown, the neurodynamic agent model must operate based on assumptions about the interaction structure, resulting in approximately O(N²) edges. O(·) denotes the asymptotic upper bound, representing how the complexity of the algorithm grows with the input size N (number of nodes). Crucially, the subsequent message function involves inputting these edge features into a multilayer perceptron (MLP). Since this MLP is applied independently to each edge, the computational complexity scales with O(N²·d²), where d is the hidden layer dimension. This quadratic scaling of the computational complexity for the expensive nonlinear MLP transformation leads to rapid depletion of GPU memory and computation time as the number of nodes N increases.
[0068] The advantage of the relational reasoning model (DARI) of this invention lies in its node-centric computation. In contrast, DARI employs an attention-based architecture, transforming the computational paradigm. Node-level linear projection (O(N)): The main parameterization operations, including Q, K, V projections and feedforward networks (FFN), directly act on the node feature matrix H. The complexity of these steps is O(N·d²). Compared to the baseline, this reduces the computationally intensive feature extraction by a factor of N.
[0069] Pairwise interaction (O(N²)): While the computation of the attention map involves an N×N matrix, this operation is a scaled dot product with a complexity of O(N²·d). Unlike the edge-by-edge MLP in the baseline, this step is highly optimized for matrix multiplication on modern hardware and does not involve passing N² vectors through multiple dense layers.
[0070] The dominant complexity term of the baseline method scales by O(N²·d²) because the multilayer perceptron is applied to all edges in the fully connected graph. In contrast, the complexity of the DARI method in this invention scales by O(N·d² + N²·d). Considering that the hidden layer dimension d is typically large, the multiplicative coupling of N² and d² in the baseline method creates a significant computational bottleneck. The DARI method in this invention achieves superior efficiency by limiting the heavily weighted nonlinear transformation to the node level, which scales linearly with N, and by handling quadratic interactions through lightweight matrix multiplication.
[0071] Example 1 This embodiment evaluates relational reasoning models on seven representative dynamical systems, covering linear, nonlinear, chaotic, and stochastic behaviors in continuous / discrete settings: Michaelis-Menten dynamics: simulating nonlinear biochemical reactions in gene regulatory networks.
[0072] Diffusion: A continuous-time linear heat conduction model based on the Laplace matrix.
[0073] Springs: A second-order continuous-time physical system that includes the interaction between position and velocity.
[0074] Kuramoto model: describes the synchronization behavior of a nonlinear phase-coupled oscillator.
[0075] Friedkin-Johnsen (FJ) dynamics: a discrete-time model of public opinion evolution that incorporates individual susceptibility and preconceived notions.
[0076] Coupled Mapping Network (CMN): A discrete-time chaotic system based on Logistic mapping, used to test the ability to capture chaotic behavior.
[0077] SIS infectious disease model: simulates disease transmission within a finite population, exhibiting discrete and stochastic characteristics.
[0078] This embodiment evaluates relational reasoning models under four different graph settings: including undirected / directed and unweighted / weighted combinations. The underlying network topology is generated by two standard paradigms: Erdos-Renyi (ER): representing a uniformly random graph where edges are formed independently with a fixed probability p; and Barabasi-Albert (BA): representing a scale-free network generated through a priority connection mechanism. In the directed graph setting, a recursive growth mechanism is used to generate in-degree and out-degree that conform to a power-law distribution to simulate real-world hub structures. For the weighted graph, edge weights are uniformly sampled from the interval [0,1], while the edge weights of the unweighted graph are set to 1.
[0079] Baseline methods: First, Neural Relational Inference (NRI). Since NRI is designed for amortized settings, this embodiment uses a version without a graph encoder to accommodate the classic non-amortized setting of concern in this invention (i.e., all trajectories share the same underlying graph). Second, GraphDynamicsPrior (GDP), which performs excellently in undirected, unweighted graph inference, serves as the primary benchmark for this setting. Third, RIVA, designed specifically for relation inference in weighted graphs, is used to evaluate the ability to recover interaction strength. Finally, this embodiment also incorporates information-theoretic statistical methods, including mutual information (MI) and transitive entropy (TE).
[0080] Evaluation metrics: To evaluate the ability of the relational reasoning model to infer potential interaction structures from observed data, the reconstructed adjacency matrix is compared with the true adjacency matrix, and different evaluation metrics are used according to the type of graph: For unweighted graphs, the inference process is regarded as a binary classification task (determining the existence of edges) and the area under the ROC curve (AUC) is used for quantification; for weighted graphs, the recovery of interaction strength is regarded as a regression task, and the Pearson correlation coefficient (PCC) is used to measure the consistency between the predicted weights and the true weights.
[0081] Implementation details: The NeuralDynamicsProxy model has a hidden layer dimension of 512 and a multi-head attention mechanism with 4 attention heads. The proxy model is trained using the Adam optimizer with a batch size of 64 and 1000 epochs. Specific initial learning rates are set for different graph structure tasks: the learning rate for the graph generator is fixed at 0.1; for the NeuralDynamicsProxy model, the learning rate for unweighted graph tasks is set to... Weighted graph tasks are set as In addition, the learning rate decay factor was set to 0.9.
[0082] Results on Undirected and Unweighted Graphs: The performance of relation inference models on undirected and unweighted graphs was evaluated using six representative dynamical systems. Experiments were conducted in two topologies: ER random graphs and BA scale-free networks, with a fixed node size of N=50. To construct the observation dataset, the generated raw trajectories were downsampled: the sampling interval for Spring dynamics was set to 20, while the other systems maintained their original resolution (sampling interval of 1). The “Sample Settings” column in the table details the scale of the training data, denoted as M×T, where M represents the number of trajectories in the training set, a trajectory is a time-varying feature sequence generated by all nodes, and T represents the number of time sampling steps for each trajectory.
[0083] Table 1 summarizes the comparative results of each inference model on undirected, unweighted graphs. Overall, DARI outperforms all baseline models in all dynamical systems and graph structure configurations, demonstrating its superior ability to infer potential interaction structures.
[0084] Table 1. Model performance on undirected, unweighted graphs.
[0085] First, in a horizontal comparison with baseline models, DARI significantly outperforms traditional statistical methods such as mutual information (MI) and transfer entropy (TE), as well as the earlier deep learning method NRI. GDP, as the most competitive baseline, achieves high scores close to DARI in relatively simple linear systems such as spring networks and FJ dynamics, but shows significant shortcomings when dealing with complex nonlinear behaviors. Particularly in coupled-image networks (CMN) with chaotic characteristics and Kuramoto models involving nonlinear oscillations, DARI significantly outperforms GDP, demonstrating its advantage in handling complex dynamic mechanisms.
[0086] Secondly, DARI demonstrates strong robustness to different network topologies. Experiments show that when the network structure changes from a uniform ER random graph to a more heterogeneous BA scale-free network, the performance of the baseline model often declines significantly. For example, in the Kuramoto task, the AUC of GDP drops from 94.93% in the ER graph to 90.13% in the BA graph. In contrast, DARI maintains extremely high stability on the BA graph, with an AUC score consistently exceeding 96%, strongly demonstrating that the model can effectively handle the challenges posed by complex network structures and hub nodes.
[0087] Finally, DARI demonstrated extremely high data efficiency. Notably, even with limited training data, such as spring dynamics using only 15 trajectories, DARI still achieved a near-perfect inference accuracy of over 99.9%, further confirming the model's efficiency in capturing underlying physical laws.
[0088] Multiple Graph Types: To further validate the model's generality, the evaluation scope was extended to more challenging graph topology settings. Table 2 shows the model's inference performance on directed unweighted, undirected weighted, and directed weighted graphs. Experiments covered dynamical systems with different interaction characteristics, including Kuramoto, FJ, SIS, and Spring. Consistent with the evaluation of unweighted graphs, synthetic data were generated based on ER and BA topologies, and the same downsampling strategy was applied according to the dynamics type.
[0089] Table 2. Model performance on various graph types.
[0090] The results in Table 2 confirm that DARI maintains a significant performance advantage even under more challenging graph topologies.
[0091] First, in directed unweighted settings, the core challenge of inference lies in distinguishing the directionality of interactions, i.e., asymmetric influences. DARI demonstrates strong robustness in this regard, effectively decoupling causal direction from time series. For example, in FJ dynamics, DARI's AUC performance on ER and BA graphs far surpasses other baseline methods. Furthermore, for SIS models with stochastic characteristics, DARI still achieves an excellent score of over 90% even when the baseline model RIVA performs poorly, demonstrating its effectiveness in handling discrete probabilistic systems and asymmetric dependencies.
[0092] Secondly, in weighted graph inference, DARI demonstrated its ability to accurately recover continuous interaction strengths, comprehensively surpassing the baseline RIVA, which is specifically designed for weighted graphs. In the BA graph task with undirected weighted Spring dynamics, DARI's PCC is significantly higher than RIVA's 23.05%, indicating that DARI can accurately fit physical parameters in heterogeneous networks. In the most challenging directed weighted setting, the baseline model exhibited severe performance degradation, but DARI remained robust, significantly outperforming both the FJ and chaotic Kuramoto models. This fully demonstrates DARI's superior advantage in simultaneously decoupling interaction direction and intensity in complex scenarios.
[0093] To evaluate the computational efficiency of the model when processing graph systems of different scales, the resource overhead of DARI and the baseline model NRI in terms of GPU memory usage and single-round training time was compared. The experiments used Diffusion (DF) dynamics data, containing 50 independent trajectories, with each trajectory sampled for 30 time steps. The system node size N was gradually increased from 5 to 200. To ensure a fair comparison, the hidden layer dimension of both models was fixed at 512, and the batch size during training was uniformly set to 32. Figure 2 The data shows the trend of resource consumption changes in the two models as the node size N increases, with the vertical axis using a logarithmic scale.
[0094] Video memory usage analysis: Figure 2 (a) in the paper provides a detailed comparison of GPU memory usage for DARI and NRI at different network sizes. When the node size is small, i.e., N is less than or equal to 10, DARI's memory usage is slightly higher than NRI's, mainly due to the basic overhead of the attention architecture. However, as N increases, NRI's memory consumption shows a sharp upward trend, soaring to 20430MB when N equals 200. In contrast, DARI only uses 1570MB at the same scale, which is only about one-thirteenth of NRI's, demonstrating excellent memory efficiency.
[0095] Training time analysis: Figure 2 (b) compares training efficiency as a measure of time required per epoch. The results clearly demonstrate that DARI is significantly faster and more scalable in terms of training speed. At a node size of N=200, NRI requires approximately 10.03 seconds per epoch, while DARI completes it in just 0.52 seconds, a speedup of nearly 20 times. This significant reduction in DARI's training time overhead is primarily attributed to its attention-based architecture, which supports efficient parallel computation, resulting in faster model convergence and improved feasibility for practical applications involving large-scale graph dynamics.
[0096] Example 2 To evaluate the effectiveness of the relation inference model in real-world scenarios, disease transmission data was used to infer transmission relationships between regions. A spatiotemporal COVID-19 transmission dataset covering 163 weeks from February 2, 2020, was constructed, involving six geographically diverse regions, denoted as A, B, C, D, E, and F. Time-series node features consist of weekly infection numbers. In the preprocessing stage, the raw cumulative data underwent differencing to correct negative values, and was summarized weekly to mitigate noise in daily reported data. To construct the underlying graph topology, a population flow network based on "Local Origin-End Employment Statistics" (LODES) was utilized, prioritizing data from 2021 and 2022 to accurately capture the flow dynamics related to the disease transmission timeline. Formally, the prediction task was defined as: predicting the number of local infections in week t based on observations from a three-week historical backtracking window (weeks t-3 to t-1).
[0097] Experimental Results: Given that the actual propagation path is implicit (unobservable), the LODES population flow network was used as a proxy indicator to verify the physical rationality of the inferred structure. Figure 3 The population flow maps (top row) of LODES in six regions were compared with the potential propagation maps (bottom row) inferred by this model. To highlight the main structural framework, only the edges with the highest weights in each map are visualized and highlighted in yellow.
[0098] like Figure 3 The Pearson correlation coefficient (PCC) quantification results show that the inferred transmission map is highly consistent with the observed population movement patterns in all regions. PCC values range from 0.679 in region C to 0.827 in region A, with an average correlation exceeding 0.76. In regions with complex urban structures (such as regions B and E), the model achieves extremely high correlations. These results demonstrate that the proposed DARI framework can reconstruct key population movement patterns solely from epidemiological time-series data, without requiring explicit supervision of any movement information during the inference process.
[0099] DARI accurately reconstructs the core structural framework of human-mediated transmission, including: identifying the radial "hub-and-spoke" structure centered on metropolitan areas in regions B and D; the linear corridor-like structure along major transportation arteries in regions E and C; and the long-range connections between sparse population centers unique to region A. The inferred transmission map is not a simple replica of the population flow network because LODES only captures commuting data, while disease transmission also involves social gatherings, leisure travel, and sporadic superspreading events. The newly added edges and intensity variations in the inferred map largely reflect epidemiological transmission paths beyond census-based population movements.
[0100] The Relational Inference Model (DARI) framework proposed in this invention utilizes a bidirectional attention mechanism to simultaneously capture dependencies in both in-degree and out-degree directions. It is flexibly compatible with various graph structures, including directed, undirected, and weighted graphs, achieving efficient joint learning of latent topological structures and dynamic evolution. Computationally, DARI cleverly avoids the expensive edge-level operations of traditional methods, significantly reducing computational complexity. Extensive experimental results demonstrate that DARI achieves superior inference accuracy across diverse scenarios, while exhibiting significant advantages in training efficiency and memory usage compared to strong baseline models. Experiments using disease transmission data further show that the inferred transmission structure is consistent with real-world population movement patterns.
[0101] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for reasoning about relationships in dynamic systems based on bidirectional attention, characterized in that, The dynamic system is an infectious disease transmission model, where nodes represent regions and node characteristics include the number of infected people in each region. The trajectory data of the nodes is constructed based on the number of infected people in each region at each time. A relational reasoning model is constructed, which includes a graph generator and a neurodynamic agent model. The trajectory data of the nodes are input into the relational reasoning model, and the graph generator and the neurodynamic agent model are trained simultaneously. The trained graph generator is used to generate the interaction structure between N nodes in the dynamic system, obtain the interaction relationship between regions, and infer the transmission association of sensory diseases between regions. The graph generator is based on structural parameters Generate the interaction structure between nodes, and represent the interaction structure between nodes using an adjacency matrix A; The neurodynamic surrogate model Based on the trajectory data of the nodes Given an adjacency matrix A by the graph generator, the dynamic system is modeled using the observed node trajectory data; where, These are the model parameters for the neurodynamic proxy model; the neurodynamic proxy model is based on the bidirectional attention graph Transformer architecture. The training method for the relational reasoning model is as follows: a training graph generator generates an adjacency matrix A, while a neurodynamic agent model is trained in an unsupervised learning manner. The training objective of the relational reasoning model is to maximize the conditional likelihood of the observed node trajectory data given the adjacency matrix A. The total loss function of the relational reasoning model includes: a likelihood-based dynamic system prediction loss term, and a regularization term applied to the inferred interaction structure; Node trajectory data ,in, The feature set of all nodes, i.e., N nodes, at time t; Let i represent the feature vector of node i at time t; i = 1, 2, ..., N; t = 0, 1, ..., T-1; The neurodynamic surrogate model captures historical trajectory data using a sliding window. Predicting the node state at the next moment using historical trajectory data ; The window step size; The specific details of the neurodynamic surrogate model are as follows: The neurodynamic surrogate model consists of an input layer, a bidirectional attention module, a fusion module, a feedforward network, and an output layer. The processing procedure is as follows: S1, the input layer will input data. The features are concatenated along the feature dimension and transformed using a multilayer perceptron (MLP) to obtain the input features for the bidirectional attention module. ; S2, the processing procedure of the bidirectional attention module is as follows: S21, the bidirectional attention module includes K parallel attention heads, each attention head The processing procedure is as follows: Attention Input features Projecting each linear layer into a query item Key items and two numerical terms , : ; in, For attention head The projection matrix; k represents the k-th attention head, k=1,...,K; The attention score is calculated by scaling the dot product and then transformed using the Softplus function. ; in, For attention head Attention score; Softplus is a non-linear activation function: Let k be the feature dimension of the attention head; Each attention head It is decomposed into two branches with multiplicative masks: a forward mask branch and a reverse transpose mask branch. The forward masking branch is responsible for capturing the positive dependencies in the interaction structure, and converting the adjacency matrix... As a mask for attention score Perform the Hadamard product to obtain the masked attention matrix, and then aggregate the information to the target node through the incoming edges. The calculation method is as follows: ;in, The product of Hadamard; Features of the mask branch output; The inverse transpose mask branch is responsible for capturing the inverse dependencies in the interaction structure. It transposes the attention matrix after masking in the mask branch and aggregates the information to the target node through outgoing edges. The calculation method is as follows: ; Features of the transpose mask branch output; S22, the features output from the masked branches and transposed masked branches of the K parallel attention heads are processed by feature concatenation and linear transformation to generate positive and negative features respectively: ; ; in, Let be the projection matrix of the linear transformation. These are positive features and negative features, respectively; S3, the fusion module will integrate positive features Transpose feature and input features By splicing, the splicing features are obtained. ; S4, the feedforward network consists of two layers, and the calculation method is as follows: , ; in, This is the output of the first layer of the feedforward network. This is the output of the second layer of the feedforward network. It is a multilayer perceptron. This is the normalization function; S5, the output layer outputs the node state at the next time step. .
2. The dynamic system relation reasoning method based on bidirectional attention according to claim 1, characterized in that, For an unweighted graph, the graph generator generates the adjacency matrix A as follows: The graph generator assumes that the nodes are ordered pairs. There exists a binary interaction relationship, denoted as 'a'. , representing two relationship types: no interaction and interaction, respectively; the ordered pairs of nodes This represents a directed edge from node i to node j. No interaction indicates that the directed edge does not exist, and interaction indicates that the directed edge exists. For each node, ordered pairs That is, each directed edge is assigned two real-valued hidden variables. , representing the implicit scores for the probabilities of no interaction and interaction, respectively. Represents real numbers, with nodes in an ordered pair The interaction probability is obtained through the Softmax function: ; in, For nodes to be ordered Belongs to relation type The probability, This indicates no interaction. A 1 indicates that there is interaction; It is a fixed inverse temperature parameter used to control the sharpness of the distribution; For node ordered pairs The trainable structural parameters; Softmax is the exponential normalization function; Structural parameters Ordered by each node Real-valued hidden variables Composition, graph generator based on structural parameters Generate ordered pairs of nodes The interaction probability is used to generate the adjacency matrix A, which is defined by the probability that there is an interaction between ordered pairs of nodes. edge weight .
3. The dynamic system relation reasoning method based on bidirectional attention according to claim 1, characterized in that, For a weighted graph, the graph generator generates the adjacency matrix A as follows: The graph generator will sort the nodes into pairs. The interaction relationships between nodes are represented by positive edge weights; the nodes are ordered pairs. This represents a directed edge from node i to node j. The larger the edge weight, the stronger the interaction relationship. ; For each node, ordered pairs That is, each directed edge is assigned a real-valued potential score. , Represent real numbers, and use the Softplus function to convert real-valued potential scores. Mapped to ordered pairs of nodes Edge weights: ; in, For node ordered pairs Edge weights; For node ordered pairs The trainable structure parameters; Softplus is the non-linear activation function: Structural parameters Ordered by each node Real-valued latent score Composition, graph generator based on structural parameters Generate ordered pairs of nodes The edge weights are determined to generate the adjacency matrix A.
4. The dynamic system relation reasoning method based on bidirectional attention according to claim 1, characterized in that, Likelihood-based dynamic system loss prediction for: ; in, Let be the single-step conditional transition probability of the neurodynamic surrogate model, representing the neurodynamic surrogate model based on historical trajectory data. and adjacency matrix For the node state at the next time step The predicted probability; Represents historical trajectory data ; Apply a regularization term to the inferred interaction structure. For unweighted graphs, the KL divergence term between the predicted edge distribution and the sparse-induced prior is used as a regularization term; for weighted graphs, the inferred adjacency matrix is regularized. Regularization term; The total loss function of the relational reasoning model is: ; The training objective of the relational reasoning model is .
5. The dynamic system relation reasoning method based on bidirectional attention according to claim 4, characterized in that, Assuming that the observations at each node follow a Gaussian distribution, minimizing the negative log-likelihood is transformed into minimizing the squared error loss. Transform into: ; in, Let be the feature vector of node j at time t+1; The mean of the distribution is generated by the neurodynamic surrogate model.
6. A readable storage medium, characterized in that, It stores a computer program, which, when executed, implements a dynamic system relation reasoning method based on bidirectional attention as described in any one of claims 1 to 5.
7. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the dynamic system relation reasoning method based on bidirectional attention as described in any one of claims 1 to 5.