Symbol regression method and device and electronic equipment
Through the symbolic regression method and symbolic prediction model based on Monte Carlo tree search, combined with network topology structure and node activity data, a search tree is created to predict unknown symbols, which solves the problem of discovering network dynamics formulas in complex network systems, and achieves efficient and accurate formula acquisition.
Patent Information
- Application Number
- CN202510524784.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-15
AI Technical Summary
Existing symbolic regression methods cannot accurately discover network dynamic formulas in complex network systems, especially in the absence of prior knowledge, traditional methods have problems with huge search space and insufficient expression capabilities.
The symbolic regression method based on Monte Carlo tree search is adopted, combined with a pre-trained symbolic prediction model, and unknown symbols in the search tree are predicted through network topology and node activity data, and a search tree is created to obtain network dynamics formulas.
Given the observation data of complex network systems, accurately discovering network dynamic formulas solves the problem that traditional methods cannot be effectively applied to complex network systems, and realizes efficient formula discovery.
Smart Images

Figure CN120499019A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a symbolic regression method, device, and electronic device. Background Art
[0002] Network dynamics is a mathematical formula that describes complex systems. In complex systems, numerous nodes interact locally, generating global, nontrivial behavior for the entire system. The behavior of complex systems cannot be fully understood solely through knowledge of individual nodes; instead, it relies on network dynamics. Network dynamics, which mathematically describes how the states of network nodes change as a result of their interactions, is a cornerstone of the theoretical analysis of the properties of complex systems and a crucial foundation for studying a wide range of natural and social systems.
[0003] Symbolic regression is a method that uses computers to automatically find the optimal mathematical formula to model given data. It is widely used in fields such as dynamics, materials science, and physical chemistry, aiming to more efficiently model scientific phenomena and accelerate scientific discovery. Unlike traditional methods that rely on domain experts to construct mathematical formulas based on their knowledge to explain experimental results, symbolic regression searches for combinations of mathematical symbols (such as arithmetic operations, trigonometric functions, exponents, logarithms, constants, and independent variables) to find the optimal mathematical expression that describes the experimental results in the shortest possible formula and with the highest degree of fit. This feature enables symbolic regression to discover potential mathematical models in fields lacking prior knowledge of the underlying mechanisms, and the resulting mathematical expressions can facilitate the exploration and discovery of new scientific knowledge.
[0004] However, due to the high dimensionality of networks, symbolic regression has been consistently considered inapplicable to formula discovery in the field of network dynamics. Specifically, networks contain a large number of nodes, each with its own unique characteristics, and the formulas describing a node's dynamics depend on other nodes. This causes both the total number of features and the total length of the target dynamics to increase with the number of nodes, ultimately leading to a massive search space that explodes exponentially with the increase in the number of nodes. Consequently, traditional symbolic regression methods based on search algorithms such as genetic algorithms, Monte Carlo tree search, and deep reinforcement learning are ineffective in discovering network dynamics formulas. Generation-based symbolic regression algorithms such as NeurSR and E2ESR are also not applicable because the observed data in network dynamics consists of both network topology and node activity data, which differs from the input data structure used by these methods. Besides symbolic regression, while some methods attempt to discover network dynamics formulas from data, these methods rely on linear search rather than symbolic regression, making them inadequate for dynamic discovery in unknown complex systems due to their limited expressiveness. Specifically, these methods maintain a library of predefined functions with specified formula forms and parameter values and represent the target formula as a linear combination of the functions in this library. Therefore, it can only find target formulas that are linear combinations of functions from a predefined library, limiting its expressive power to that library. The size of this library is further limited by the number of sample points in the observed data, making it impossible to accurately discover network dynamics formulas in unknown systems without prior knowledge. Therefore, designing symbolic regression methods that can accurately discover network dynamics formulas in complex networks is an urgent problem. Summary of the Invention
[0005] The present application provides a symbolic regression method, device and electronic device to address the defect that the symbolic regression method in the prior art cannot accurately discover the network dynamics formula in a complex network system. Given the observation data (network topology structure and node activity data) on a complex network system (target system), the pre-trained symbolic prediction model can be applied to the symbolic regression method based on Monte Carlo tree search. In the process of expanding the nodes in the search tree, the symbolic prediction model is used to predict the unknown symbols in the formula corresponding to the node, thereby realizing the smooth expansion of the search tree, and thus achieving the technical purpose of accurately obtaining the network dynamics formula corresponding to the target system.
[0006] This application provides a symbolic regression method, comprising the following steps: Determining a target system for symbolic regression, wherein the target system includes a plurality of different parameters, and a coupling relationship exists between the plurality of parameters; Obtaining a network topology of the target system and node activity data corresponding to nodes in the network topology, wherein the network topology includes a plurality of different nodes and connection relationships between the nodes, the nodes in the network topology represent parameters in the target system, and the node activity data is determined based on historical data corresponding to the plurality of parameters; With the goal of obtaining a network dynamics formula for fitting the relationship between various parameters in the target system, a search tree is created by a symbolic regression method based on Monte Carlo tree search, and in the process of expanding the nodes in the search tree, unknown symbols in the formula corresponding to the nodes in the search tree are predicted based on the network topology, the node activity data, and a pre-trained symbol prediction model, where one node in the search tree corresponds to one formula; After the search tree is created, the network dynamics formula corresponding to the target system is determined according to the search tree.
[0007] The present application also provides a symbol regression device, comprising: A first determining module is used to determine a target system to be subjected to symbolic regression, wherein the target system includes a plurality of different parameters, and a coupling relationship exists between the plurality of parameters; a first acquisition module, configured to acquire a network topology of the target system and node activity data corresponding to nodes in the network topology, wherein the network topology includes a plurality of different nodes and connection relationships between the nodes, the nodes in the network topology represent parameters in the target system, and the node activity data is determined based on historical data corresponding to the plurality of parameters; an expansion module configured to obtain a network dynamics formula for fitting the relationship between various parameters in the target system, create a search tree using a symbolic regression method based on Monte Carlo tree search, and, in the process of expanding nodes in the search tree, predict unknown symbols in the formula corresponding to the nodes in the search tree based on the network topology, the node activity data, and a pre-trained symbol prediction model, where one node in the search tree corresponds to one formula; The second determining module is configured to determine the network dynamics formula corresponding to the target system according to the search tree after completing the creation of the search tree.
[0008] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a symbolic regression method as described above is implemented.
[0009] The present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the symbolic regression method as described above is implemented.
[0010] The present application also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-described symbolic regression methods.
[0011] To implement the method of the present application, the target system to be subjected to symbolic regression is first determined. The target system includes multiple different parameters, and there is a coupling relationship between the multiple parameters. The network topology of the target system and the node activity data corresponding to the nodes in the network topology are then obtained. The nodes in the network topology represent the parameters of the target system, and the node activity data is determined based on the historical data corresponding to the multiple parameters. Next, a pre-trained symbolic prediction model is applied to a symbolic regression method based on Monte Carlo tree search. During the process of expanding the nodes in the search tree, the symbolic prediction model is used to predict the unknown symbols in the formula corresponding to the nodes, thereby achieving smooth expansion of the search tree. Finally, after the search tree is created, the network dynamics formula corresponding to the target system can be accurately determined based on the search tree. The present application can accurately discover the network dynamics formula in a complex network system (target system) given the observed data (network topology and node activity data) on the complex network system, effectively solving the problems in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0013] Figure 1 This is a flow chart of a symbolic regression method shown in one embodiment of the present application; Figure 2 This is a schematic diagram of a process of expanding a search tree according to an embodiment of the present application; Figure 3 is a schematic diagram of a network dynamics operator shown in one embodiment of the present application; Figure 4 This is a schematic diagram of the principle of a training symbol prediction model shown in one embodiment of the present application; Figure 5 This is a schematic diagram of the structure of a preset neural network shown in one embodiment of the present application; Figure 6This is a flowchart of an implementation of a symbolic regression method shown in one embodiment of the present application; Figure 7 This is a structural block diagram of a symbol regression device shown in one embodiment of the present application; Figure 8 This is a schematic diagram of the physical structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0014] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0015] Figure 1 This is a flowchart of a symbolic regression method shown in one embodiment of the present application. Figure 1 , the symbolic regression method of the present application may specifically include the following steps: Step 101: Determine a target system to be subjected to symbolic regression. The target system includes multiple different parameters, and there is a coupling relationship between the multiple parameters.
[0016] In the present application, the target system includes a large number of parameters, each of which has its own characteristics, and the formula describing the dynamics of a certain parameter depends on other parameters, that is, there is a strong coupling relationship between these parameters. Any system that meets this characteristic can be used as the target system in this application. For example, the target system can be a climate prediction system, and the multiple parameters in the climate prediction system can include atmospheric temperature, atmospheric pressure, sea surface temperature, ocean heat content, sea ice area, etc. For another example, the target system can be a traffic flow prediction system, and the multiple parameters in the traffic flow prediction system can include: number of vehicles, road grade, intersection type, distribution of traffic facilities, time, season, weather conditions, etc.
[0017] In step 101, symbolic regression is performed on the target system. Specifically, based on the real data corresponding to multiple parameters in the target system, a network dynamics formula is obtained to fit the relationship between these parameters. For example, if a climate prediction system is to be designed, a network dynamics formula can be obtained based on the real data corresponding to parameters such as atmospheric temperature, atmospheric pressure, sea surface temperature, ocean heat content, and sea ice area to fit the relationship between these parameters. This network dynamics formula can then be used to explain the prediction principle of the resulting climate prediction system.
[0018] Step 102: Obtain the network topology structure of the target system and the node activity data corresponding to the nodes in the network topology structure. The network topology structure includes multiple different nodes and the connection relationships between the nodes. The nodes in the network topology structure represent parameters in the target system. The node activity data is determined based on historical data corresponding to multiple parameters in the target system.
[0019] In this application, each parameter in the target system can be represented as a node, and the relationship between different parameters can be represented by edges, thereby obtaining the network topology corresponding to the target system. After obtaining the network topology, the node activity data corresponding to the nodes of the entire network topology can be obtained based on the historical data of the parameters corresponding to each node in the network topology.
[0020] For example, if the target system is a climate prediction system, and the nodes in the network topology correspond to atmospheric temperature, atmospheric pressure, and sea surface temperature, then for atmospheric temperature, atmospheric temperature values at different historical moments can be obtained. A moment here can also refer to a time period, such as a day or a month, and the duration can be customized based on actual needs. Atmospheric temperature values can also have multiple feature dimensions. For example, if the historical moment is a month, the corresponding historical data for atmospheric temperature could include the highest, lowest, and average atmospheric temperature values for each month over the past ten years (with a feature dimension of three). Using this approach, historical data corresponding to atmospheric pressure and sea surface temperature can be obtained. This historical data is then preprocessed, and the higher-value preprocessed data can be used as the node activity data corresponding to the nodes in the network topology. Preprocessing can be customized based on actual needs, such as processing missing and duplicate values to improve the quality of node activity data.
[0021] Step 103: With the goal of obtaining a network dynamics formula for fitting the relationship between various parameters in the target system, a search tree is created using a symbolic regression method based on Monte Carlo tree search (MCTS). In the process of expanding the nodes in the search tree, the unknown symbols in the formula corresponding to the nodes in the search tree are predicted based on the network topology, node activity data, and a pre-trained symbol prediction model. One node in the search tree corresponds to one formula.
[0022] Since the goal of this application is to obtain the network dynamics formula corresponding to the target system, a search tree is first created through a symbolic regression method based on Monte Carlo tree search. Each node in the search tree represents a formula, which can be a complete formula or an incomplete formula.
[0023] In the process of expanding the nodes of the search tree, the root network topology, node activity data and pre-trained symbol prediction model can be used to predict the unknown symbols in the formula corresponding to the nodes in the search tree, thereby achieving smooth expansion. For example, the formula corresponding to a node is ,in, A placeholder for an unknown symbol. is the independent variable, is a placeholder for a numeric constant. The aggregation edge operator designed for this application (to be described later) can be predicted by the symbolic prediction model , and then we get the complete formula.
[0024] Step 104: After the search tree is created, the network dynamics formula corresponding to the target system is determined according to the search tree.
[0025] In this application, after the search tree is created, the formula corresponding to each node in the search tree can be evaluated to find the formula closest to the target formula. This formula can then be modified based on linear regression methods to obtain the target formula, which is the network dynamics formula corresponding to the target system. How to obtain the network dynamics formula based on the search tree can be implemented by referring to existing symbolic regression methods. The focus of this application is to use a symbolic prediction model to guide the implementation of a symbolic regression method based on Monte Carlo tree search, so that the search tree can be smoothly expanded and the network dynamics formula corresponding to the target system can be accurately obtained.
[0026] Therefore, the method of the present application first determines the target system to be subjected to symbolic regression. The target system includes multiple different parameters, each of which has a coupling relationship. The network topology of the target system and the node activity data corresponding to the nodes in the network topology are then obtained. The nodes in the network topology represent parameters in the target system, and the node activity data is determined based on the historical data corresponding to the multiple parameters. Next, a pre-trained symbolic prediction model is applied to a symbolic regression method based on Monte Carlo tree search. During the process of expanding the nodes in the search tree, the symbolic prediction model is used to predict the unknown symbols in the formula corresponding to the nodes, thereby smoothly expanding the search tree. Finally, after the search tree is created, the network dynamics formula corresponding to the target system can be accurately determined based on the search tree. The present application can accurately discover the network dynamics formula in a complex network system (target system) given the observed data (network topology and node activity data) on the complex network system, effectively resolving the problem in related technologies of being unable to accurately obtain the network dynamics formula for complex network systems.
[0027] In combination with the above embodiment, in one implementation, the search tree includes a target node, the target node includes the first unknown symbol, and the target node is a node in the search tree. Accordingly, step 103 may include: Step 1031: Input the network topology structure, node activity data, and the formula corresponding to the target node into the symbol prediction model to obtain a first probability distribution of the preset symbol set corresponding to the first unknown symbol, wherein the first probability distribution includes the probability that each symbol in the preset symbol set is the first unknown symbol.
[0028] In this application, probability distributions can be expressed using For example, the symbols in the preset symbol set may include {+, sin, x}, where x represents a variable, and the first probability distribution of the output may be =[0.6, 0.3, 0.1], which means there is a 60% chance that the first unknown symbol is +, a 30% chance that it is sin, and a 10% chance that it is x. In a probability distribution, the sum of the components is 1.
[0029] Step 1032: Determine a candidate child node to be expanded with the target node as the parent node according to the first probability distribution, where the formula corresponding to the candidate child node is generated based on the symbol with the highest probability in the preset symbol set.
[0030] Step 1033: If the candidate child node is not in the search tree, add the candidate child node to the search tree to expand the search tree.
[0031] In the present application, after step 1033, the method of the present application may further include: Step 1034: If the formula corresponding to the candidate sub-node contains a second unknown symbol, the network topology structure, node activity data and the formula corresponding to the candidate sub-node are input into the symbol prediction model to obtain a second probability distribution of the preset symbol set corresponding to the second unknown symbol, and the second unknown symbol is different from the first unknown symbol.
[0032] Step 1035: Determine the symbol with the highest probability in the second probability distribution as the second unknown symbol, until a complete formula corresponding to the candidate child node is obtained.
[0033] Step 1036: Determine the reward value corresponding to the complete formula, and based on the reward value, update the search tree through back propagation.
[0034] In this application, the symbolic regression method based on Monte Carlo tree search mainly updates the search tree through a cyclic iteration of four steps: selection, expansion, simulation, and backpropagation. The following is a complete embodiment that describes steps 1031-1036 in detail. In this process, the symbols in the preset symbol set are {+, sin, x}.
[0035] Figure 2 This is a schematic diagram of a process of expanding a search tree according to an embodiment of the present application. Figure 2 As shown in a, after the algorithm is initialized, there is only one root node * in the search tree (node * indicates that the formula corresponding to the node is *), * represents the placeholder for unknown symbols. = , then, perform the following steps: Step 1: Input the observation data corresponding to the target system (network topology and node activity data) and the formula corresponding to the root node into the symbolic prediction model. The probability distribution output by the symbolic prediction model is =[0.6, 0.3, 0.1].
[0036] Step 2: According to The probability distribution in [1] is used to obtain three candidate child nodes. The PUCT (Partially Observable Upper Confidence Trees) of these three candidate child nodes are calculated as follows: The calculation formula is as follows: in, For the current node No. The PUCT value of candidate child nodes, For the current node No. The maximum reward value of the subtree where the candidate child node is located, that is, , is a constant, For the current node No. The number of nodes in the subtree where the candidate child node is located, that is, the number in the previous text. , is the symbol prediction model for the current node The estimated probability distribution No. A quantity, is the number of symbols in the symbol space (preset symbol set). In this embodiment, .
[0037] In this embodiment, the current node is the root node*, so for the first candidate child node, according to The first component 0.6 in is calculated as , for the second candidate child node, according to The second component 0.3 in is calculated as , for the third candidate child node, according to The third component 0.1 in is calculated as .like and All less than , then select the first candidate child node *+*. Since the first candidate child node is not in the search tree, first add the first candidate child node *+* to the search tree and and Initialized to 0 (in this application, each node in the search tree has a corresponding and ), and then select the first candidate child node, which is generated according to +, such as Figure 2 As shown in b.
[0038] The above steps 1031 to 1033 can be understood in conjunction with Step 1 to Step 2. In which, the target node corresponds to the root node, and the first probability distribution corresponds to =[0.6, 0.3, 0.1], determine that a candidate child node to be expanded with the target node as the parent node corresponds to the first candidate child node *+*.
[0039] Step 3: Calculate the reward value of child nodes *+* In this application, if the formula corresponding to a node p is a complete formula that does not contain unknown symbols, then according to the formula Calculate its return value, where , is a numerical constant, is the length of the formula corresponding to node p, is the square error of the formula corresponding to node p on the observed data, is the variance of the observed data. If the formula corresponding to node p is an incomplete formula containing unknown symbols, then mathematical symbols are continuously sampled according to the probability distribution output by the symbol prediction model to fill the placeholders of all unknown symbols until they are completed, and then the reward value of the completed formula is calculated. .
[0040] In this embodiment, since there are two unknown symbols in *+*, *+* is first input into the symbol prediction model to obtain the probability distribution. Assuming that the component with the highest probability is x, the first unknown symbol is x, and the resulting formula is x+*. Then, x+* is input into the symbol prediction model for the second time to obtain the probability distribution. Assuming that the component with the highest probability is x, the second unknown symbol is x, and the resulting formula is x+x. Finally, the reward value of x+x is calculated. .
[0041] The above process only calculates the return value of *+* once In actual implementation, we can randomly obtain M formulas for *+* completion through the symbolic prediction model, and then calculate M return values respectively. , and finally only record the largest value as the return value corresponding to *+* Wherein, M can be set according to actual needs, for example, it can be set to 10.
[0042] Step 4: Perform back propagation, starting from the newly expanded child node *+*, and perform the following operations: 1) Change the current node's Updated to ;2) Change the current node's Updated to ; 3) Get the parent node of the current node, return to Step 1, and enter the second round of iteration until the current node is the root node of the search tree.
[0043] Steps 1034 to 1036 can be understood in conjunction with Steps 3 to 4. In particular, the two unknown symbols in *+* are both second unknown symbols.
[0044] The above Step 1-Step 4 is the first iteration.
[0045] Step 5: In the second round of iteration, Figure 2 As shown in c, for the root node *, the probability distribution of * is obtained by the symbol prediction model , according to the probability distribution Get the three candidate child nodes corresponding to *, calculate the PUCT of each candidate child node using the PUCT value calculation formula, if it satisfies and All less than , select the first candidate child node *+*. Then, obtain the probability distribution of *+* through the symbolic prediction model , according to the probability distribution Get the 3 candidate child nodes corresponding to *+*, if and All less than , then select the second candidate child node sin(*)+*. Since the second candidate child node sin(*)+* is not in the search tree, first add the second candidate child node sin(*)+* to the search tree and add it and Initialize to 0, and then select the second candidate child node sin(*)+*. The second candidate child node sin(*)+* is generated based on the symbol sin. Next, calculate the reward value of the child node sin(*)+* Similarly, we randomly obtain M completed formulas for sin(*)+* through the symbolic prediction model, and then calculate M return values respectively. , and finally only record the largest value as the return value corresponding to sin(*)+* Finally, enter the back propagation step and update sin(*)+*, *+* and * corresponding to 、 , and entered the third round of iteration.
[0046] Step 6: In the third iteration, if Figure 2 As shown in d, for the root node *, the probability distribution of * is obtained by the symbol prediction model , according to the probability distribution Get the three candidate child nodes corresponding to *, calculate the PUCT of each candidate child node using the PUCT calculation formula, if and All less than , then select the second candidate child node sin*. Since the second candidate child node sin* is not in the search tree, first add the second candidate child node sin* to the search tree and add it and Initialize to 0, and then select the second candidate child node sin*. The second candidate child node sin* is generated based on the symbol sin. Next, calculate the reward value of the child node sin* Through the symbolic prediction model, M formulas for the completion of sin* are randomly obtained, and M return values are calculated respectively. Finally, record the maximum value as the return value corresponding to sin* Finally, enter the back propagation step and update the corresponding sin* and * 、 , and entered the fourth round of iteration.
[0047] Step 7: In the fourth iteration, if Figure 2 As shown in e, for the root node *, the probability distribution of * is obtained by the symbol prediction model , according to the probability distribution Get the three candidate child nodes corresponding to *, calculate the PUCT of each candidate child node using the PUCT calculation formula, if and All less than , then select the third candidate child node x. Since the third candidate child node x is not in the search tree, first add the third candidate child node x to the search tree and and Initialize to 0, and then select the third candidate child node x. The third candidate child node x is generated based on the symbol x. Next, calculate the reward value of child node x Since x is a complete formula, there is no need to use a symbolic prediction model to calculate the probability distribution, and the return value can be calculated directly Finally, enter the back propagation step and update the corresponding x and * 、 , and entered the fifth round of iteration.
[0048] Step 8: In the fifth iteration, if Figure 2 As shown in f, for the root node *, the probability distribution of * is obtained by the symbol prediction model , according to the probability distribution Get the three candidate child nodes corresponding to *, calculate the PUCT of each candidate child node using the PUCT calculation formula, if and All less than , then select the third candidate child node x, which is already in the search tree, so it can be selected directly. After selecting x, since x is already a complete formula, there is no leaf node to continue selecting, so it cannot be selected further. Next, directly calculate the reward value of x , since it has been calculated before, it can be reused directly. Finally, update the corresponding x and * 、 , and entered the sixth round of iteration.
[0049] After multiple rounds of iterations according to the above principle, we can get the following Figure 2 The search tree shown in g in can be further expanded until the time limit is reached or a formula that meets the requirements is found. At this point, the network dynamics formula corresponding to the target system can be further obtained according to the search tree.
[0050] In combination with the above embodiments, in one embodiment, the network dynamics formula of the present application adopts the network dynamics operator 、 as well as Description, the network dynamics formula is as follows: in, Represents the status of nodes in the network topology, Indicates the state changes of nodes in the network topology over time, is the autodynamics in network dynamics, is the interaction dynamics in network dynamics, is the starting point function, is the end point function, is the aggregation edge function, Used to extract the state value of the starting node of each edge in the network topology structure, Used to extract the state value of the end node of each edge in the network topology, Used to or The dimension of the result after the action is mapped back to the dimension before the action.
[0051] Take a complex network system with N nodes as an example, where the state of each node is The dynamic evolution over time can be expressed using the classic network dynamics formula as follows : in, is the network topology, representing the node To Node The side relationship. and The self-dynamics and mutual dynamics in network dynamics. Determining the network dynamics formula means: given the network topology and node activity data , determine the unknown mathematical equation and specific form of expression.
[0052] In order to better implement the method of this application, this application designs three network dynamics operators: , take the end point and aggregate edges .like Figure 3 As shown, these network dynamics operators transform the states of all nodes in the network system into As a whole , rather than a single variable . Figure 3 Schematic diagram of a network dynamics operator according to an embodiment of the present application.
[0053] starting point Acts on , output a .exist In each .in, To connect nodes and nodes The edge, is the total number of edges. For example, a complex network system contains three nodes, namely node 1, node 2, and node 3, and there are two edges between the nodes. There is an edge k1 between node 1 and node 2 (node 1 points to node 2), and an edge k2 between node 2 and node 3 (node 2 points to node 3). At this time, the state of all nodes in the network system is , E=2. For edge k1, according to , is the node number of the starting end of the edge. The starting end node is node 1, so , for edge k2, the starting node is node 2, so For example Figure 3 In, for point to The edge, through After the effect ,for point to The edge, through After the effect ,for point to The edge, through After the effect .
[0054] Take the end point Acts on , output a .exist In each For example, a complex network system contains three nodes, namely node 1, node 2 and node 3, and there are two edges between the nodes. There is an edge k1 between node 1 and node 2 (node 1 points to node 2), and there is an edge k2 between node 2 and node 3 (node 2 points to node 3). At this time, the state of all nodes in the network system is , E=2. For edge k1, according to , is the node number at the end of the edge. The end node is node 2, so , for edge k2, the terminal node is node 3, so For example Figure 3 In, for point to The edge, through After the effect ,for point to The edge, through After the effect ,for point to The edge, through After the effect .
[0055] Aggregate Edges Used to Mapping back , making ,in, It can be It can also be .for , Acts on The effect is equivalent to using Multiply The components of and sum up, so, Acts on The result is equivalent to using Multiply The components of and sum them. Figure 3 In, through right point to The edge and point to After the edges of becomes .
[0056] Using the above three operators, this application can transform the classic network dynamics formula Rephrased as: , in, Operates on the input vector element-wise. and The transformation process is as follows: In the above derivation process, is a vector, the vector The elements are . and They are all vectors, and the sum of the vectors is The element of the vector is equal to the The sum of elements. In the first term, F acts on the input vector element by element, so No. elements equal to Acts on ,Right now , for the second term, directly substitute The definition of . In the example, G acts on the input vector element by element, so the kth element of G(.) is equal to the kth element of G acting on and The kth element of and , you can get .
[0057] This application uses three designed network dynamics operators to reformulate the classic network dynamics formula, removing the network dimension and topological structure in the original expression, ensuring that it has the same expression form under any number of network nodes and topological structure. Therefore, the network dynamics can be described in a way that is independent of the network dimension, thereby achieving dimensionality reduction of the search space and effectively improving the efficiency of symbolic regression.
[0058] In combination with the above embodiments, in one implementation, the symbol prediction model of the present application is obtained by the following steps: Step 201: Obtain a random sample symbol formula.
[0059] This application first generates multiple random sample symbol formulas , where the number of independent variables in each formula is , and the length of the formula is , , The number of generated sample symbolic formulas can be set according to actual needs, and this embodiment does not impose any limitation on this.
[0060] Step 202: Generate a sample network topology structure corresponding to the random sample symbol formula, and generate sample node activity data according to the random sample symbol formula and the sample network topology structure.
[0061] In the present application, observation data is generated based on the obtained sample symbolic formula, including: generating a network topology structure with an arbitrary number of nodes and edges; generating the initial state of each node in the network topology structure; starting from this initial state, using the obtained sample symbolic formula to perform simulation on the generated network topology structure to obtain the state change process of each node, that is, the node activity data.
[0062] Specifically, this application can generate a symbolic formula with nodes and Random network topology with edges and have Node activity data of group observation samples , , , .
[0063] In this application, due to the randomly generated sample symbol formula It may diverge during iteration. To ensure numerical stability, this application does not calculate iteratively. , but are independent and identically distributed from mid-sampling Considering that in actual dynamic systems, there are often limit cycles, attractors and other structures in the state space, which makes the node activity Not evenly distributed in space, but gathered in This application uses the Gaussian Misture Model (GMM) as the sampling This model allows the generation of distributions that cluster on low-dimensional manifolds in high-dimensional space. To avoid the noise error introduced by the finite difference method, this application directly uses the symbolic function generated in Output on Instead of the time derivative obtained by the finite difference method The time derivative will be discussed later. Figure 4 This is a schematic diagram showing the principle of a training symbol prediction model according to an embodiment of the present application. Figure 4 middle, Represents the network topology According to the Bernoulli distribution, To express obedience. and Representation node At the moment Activity data, ( , )~GMM, and are independent of each other and are independently and identically distributed. Representation parameters C Obey uniform distribution (Uniform Distribution), that is C The probability of taking a value within a certain interval is uniform.
[0064] Step 203: Cut the prefix expression of the sample symbol formula to obtain the sample symbol at the cut position and the subsample symbol formula before the sample symbol, wherein the subsample symbol formula includes the third unknown symbol, and the third unknown symbol is located at the cut position.
[0065] After generating sample observation data, for each group ,Will The prefix expression of is randomly cut off at various positions to obtain the part before the cut position and the symbol at the cutoff position (i.e., the sample symbol) This application shall not exceed K pairs of samples ( , ),Will and the generated As the input of the preset neural network, the probability distribution of the output is obtained and is the true value, through cross entropy loss Perform back propagation on the preset neural network. For only The unit vector where the first indicator is 1 and the other indicators are 0, s is the probability distribution The number corresponding to the maximum value in the probability distribution The sth value in is the maximum value). To ensure the stability of training, this application does not use the method of performing gradient descent immediately during each backpropagation. Instead, the gradient of each backpropagation is accumulated, and gradient descent is performed only after the accumulated gradient exceeds a preset number of symbols. The preset number can be set according to actual needs, for example, it can be set to 10,000.
[0066] like Figure 4 As shown, first generate a random sample symbol formula to Figure 4 in For example, the prefix expression is [add, , , ,mul,C,y]. If it is cut off at the position of mul, then the symbol at the cut position is mul, and the position of mul is the position of the third unknown symbol, which is represented by the placeholder [V]. , , ,[V] can obtain a subsample symbol formula, using Indicates that the corresponding sample symbol For mul. If it is If the position is cut off, then the symbol at the cut position for ,at this time The position of the third unknown symbol is represented by the placeholder [E]. , [E], [V] can obtain a subsample symbol formula, using Indicates that the corresponding sample symbol for If you put it in If the position is cut off, then the symbol at the cut position for ,at this time The position of the third unknown symbol is represented by the placeholder [V]. According to add, [V], [V], a subsample symbol formula can be obtained. Indicates that the corresponding sample symbol for The difference between the placeholders [E] and [V] will be described later. Figure 4 middle, ( , ) is 3.
[0067] Step 204: Input the sub-sample symbol formula, the sample network topology structure, and the sample node activity data into a preset neural network to obtain a predicted value corresponding to the third unknown symbol.
[0068] Step 205: Obtain a cross entropy loss value between the predicted value and the sample symbol, and update the parameters of the preset neural network through back propagation based on the cross entropy loss value.
[0069] like Figure 4 As shown, the subsample symbol formula , sample network topology and sample node activity data are input into the preset neural network to obtain the probability distribution , The maximum value in The predicted value corresponding to the third unknown symbol in . , sample network topology and sample node activity data are input into the preset neural network to obtain the probability distribution , The maximum value in The predicted value corresponding to the third unknown symbol in . , sample network topology and sample node activity data are input into the preset neural network to obtain the probability distribution , The maximum value in The predicted value corresponding to the third unknown symbol in .
[0070] Among them, the cross entropy loss function is .
[0071] Step 206: When the training is completed, the preset neural network obtained through training is determined as a symbol prediction model.
[0072] In conjunction with the above embodiments, in one implementation, the preset neural network includes an observation data encoder, a symbolic formula encoder, and a symbolic decoder, wherein the symbolic decoder includes a transformer decoder and a multilayer perceptron network. Accordingly, step 204 may include: Step 2041: Input the sample network topology structure and the sample node activity data into the observation data encoder for feature extraction to obtain a first embedding vector.
[0073] In this application, the observation data encoder includes a graph neural network and a transformer encoder. Accordingly, step 2041 may include: Perform multi-hot encoding on the sample node activity data to obtain the encoded feature matrix; The encoded feature matrix and sample network topology are input into the graph neural network for message propagation to obtain multiple third embedding vectors; A plurality of third embedding vectors are sampled, and the sampling results are input into the transformer encoder for feature encoding to obtain a first embedding vector.
[0074] Step 2042: Input the subsample symbol formula into the symbol decoder for feature extraction to obtain a second embedding vector.
[0075] In this application, each node in the sample node activity data includes features in at least one dimension. The sample node activity data includes a node feature matrix, an edge feature matrix, and a dependent variable feature matrix. The node feature matrix includes the feature values of each node in the sample network topology in at least one dimension. The edge feature matrix includes values representing the relationships between different nodes in the sample network topology. The values in the dependent variable feature matrix are obtained by taking the time derivative of the features of each node in one dimension of the at least one dimension based on the node feature matrix and the edge feature matrix. Accordingly, step 2042 may include: Multi-hot encoding is performed on the node feature matrix, edge feature matrix and dependent variable feature matrix to obtain the encoded feature matrix.
[0076] Step 2043: Input the first embedding vector and the second embedding vector into the symbol decoder for feature decoding to obtain a third probability distribution corresponding to the third unknown symbol. The transformer decoder is used to obtain a decoding result based on the mutual attention between the first embedding vector and the second embedding vector. The multilayer perceptron network is used to obtain the third probability distribution based on the flexible maximization activation function.
[0077] Among them, the first embedding vector is as follows Figure 4 The data is embedded in , and the second embedding vector is as follows Figure 4 Formula embedding in .
[0078] Step 2044: Determine the symbol with the highest probability in the third probability distribution as the predicted value corresponding to the third unknown symbol.
[0079] Next, the structure of the preset neural network of this application is introduced in detail.
[0080] Figure 5 5 is a schematic diagram of the structure of a preset neural network shown in an embodiment of the present application. In order to adapt to the network dynamic structure, the present application designs a neural network structure as shown in 5 to capture the laws in the observed network topology and node activity sequence, and predict the unknown symbols in the formula based on this. The entire preset neural network takes the encoded network topology, node activity data and the formula to be supplemented as input, and outputs a probability distribution describing the unknown symbols in the formula to be supplemented. The architecture of the neural network mainly includes three parts: an observation data encoder, a symbolic formula encoder and a symbol decoder.
[0081] The observation data encoder consists of two parts: the graph neural network (GNN) and the transformer encoder. and node activity sequence First, the time derivative of the dimension to be predicted in the node activity sequence is calculated by the finite difference method , that is, select an important feature from D features to calculate the time derivative. is the number of nodes, is the number of time steps, is the number of features on a single node. To accommodate features with different dimensions Various problems, first fill with 0 The variable dimension is expanded to the specified width Secondly, the filling result (i.e., node feature matrix) is compared with the time derivative (i.e., the dependent variable feature matrix) is spliced along the variable dimension to obtain the feature matrix To prevent the characteristic matrix The value of the elements in the matrix is too large, which leads to numerical instability. We use the half-precision floating-point representation specified in the IEEE-754 standard to convert each element into the corresponding 01 multi-hot encoding (Multi-Hot), and use a multi-layer perceptron network. accomplish ,Will Dimensionality reduction to ,in is the dimension of multi-hot encoding ( for Figure 5 in ), is the feature dimension of GNN. Similarly, fill the edge independent variables with 0 to obtain the edge feature matrix and use another multi-layer perceptron network Reduce it to . The feature matrix , edge feature matrix and network topology Enter GNN for message propagation.
[0082] At each level of message propagation, the following calculations are performed: in, 、 、 It is a multi-layer perceptron network. For passing The feature matrix after the message propagation, It is through The edge feature matrix after the message propagation, Is a connecting node and The number of the edge.
[0083] After that, the message propagation from the L-layer GNN is and The sampling rate does not exceed embedding, and get ,Will As the input of the transformer encoder, to avoid the transformer encoder from scaling with the sequence length In addition, due to the permutation invariance between the samples of the observed data, this application Positional encoding is not used when inputting to the transformer. The Transformer encoder encodes the input to extract features from the data and obtains data embedding .
[0084] exist Figure 5 In the network topology structure used as input data, V=3 indicates that the number of nodes is 3, and E=4 indicates that there are 4 edges in the network topology structure, namely (1, 2), (2, 3), (1, 3), and (3, 1). When (u, v) is used to represent the edge, u is the starting node and v is the end node.
[0085] exist Figure 5 In the node activity data as input data, there are feature matrices corresponding to node independent variables (node feature matrix), feature matrices corresponding to edge independent variables (edge feature matrix), and dependent variables representing time derivatives (dependent variable feature matrix). [ The data in ] is based on a single node independent variable (one node corresponds to one node independent variable) with the number of features being 2 (i.e. =2) Given an example, since the number of nodes in the network topology is V=3, [ ] has 3 rows, in each row, the first value represents the first feature of the current node The second value represents the first feature of the current node Since the number of edges in the network topology is E=4, There are 4 lines in , because one feature is selected from two features to calculate the time derivative, so = 1. Time derivative .exist Figure 5 In the multi-hot embedding process, since the dimensions of the node feature matrix and the edge feature matrix are filled with 0, and Should be assigned .
[0086] exist Figure 5 The specific values of network topology and node activity data are for illustration only and do not represent the data used in actual implementation.
[0087] On the other hand, the symbolic formula encoder converts the formula to be supplemented into a formula embedding. Specifically, the symbolic formula is first converted into a symbolic sequence corresponding to its prefix expression. ,in is the sequence length, It includes all possible mathematical operators (such as addition, subtraction, multiplication, division, trigonometric functions, logarithms, etc.), network dynamics operators ( ), independent variables ( ), placeholders for numerical constants, and symbol spaces for placeholders for unknown symbols. Secondly, add start and end markers to the beginning and end of the sequence, and embed the resulting sequence into Feature sequence in dimensional space, after adding position encoding, formula embedding is obtained .
[0088] exist Figure 5 In the middle, formula to be supplemented , first according to the formula to be supplemented Get the formula tree, and then further get the sub-expression type, parent node number and prefix expression according to the formula tree. Traverse each node of the formula tree in pre-order traversal mode, embed the traversal result of the node type as the sub-expression type, embed the traversal result of the node parent node number as the parent node number, and embed the traversal result of the node corresponding mathematical symbol as the prefix expression. In the sub-expression type, ] indicates that the sub-expression corresponding to this node is Dimension, ] indicates that the sub-expression corresponding to this node is dimension.
[0089] Based on encoded data embedding and formula embedding , the symbol decoder uses the transformer decoder, based on and The mutual attention decoding between them obtains the decoding result Take the first row of the result and input it into a multilayer perceptron with a softmax output activation layer. ,pass Get the symbol space The probability distribution on . This probability distribution describes the probability that each symbol in the symbol space is filled into the placeholder of the unknown symbol in the input formula to be supplemented ( or ) to fit the probability of the input observation data.
[0090] exist Figure 5 According to the probability distribution of the symbol space of the example, the formula to be supplemented is The first one Fill in The probability of After adding this formula, we get , to the first Fill in symbols Later, a Placeholder, indicating that Fill in one subexpression of .
[0091] Figure 6 This is a flowchart of a symbolic regression method according to an embodiment of the present application. Figure 6 The process of the symbolic regression method in this application mainly includes two stages: model training and symbolic regression. In the model training stage, a large number of random network dynamics formulas are generated as training samples, and then the network dynamics formulas are rewritten using the operators designed in this application. After that, corresponding observation data (network topology and node activity data) are generated for the rewritten network dynamics formulas. The rewritten network dynamics formulas and the observation data are used to Figure 5The neural network shown is trained so that it can predict unknown symbols in the formula based on given observation data. The preset neural network obtained by training is the symbolic prediction model. Then in the second stage, based on the observation data on the given complex network system, the symbolic prediction model is used to guide the symbolic regression method based on Monte Carlo tree search. After the creation of the search tree is completed, the operators in the obtained formula (the operators designed in this application) are rewritten and restored to the traditional expression form. Then, the rewritten formula is processed to obtain the network dynamics formula corresponding to the complex network system, that is, the symbolic regression result. Among them, the mathematical formulas in the model training stage and the symbolic regression stage are all described using the network dynamics operators designed in this application, which can transform the complex symbolic search space originally in the high-dimensional network into a space equivalent to symbolic search on a one-dimensional system, greatly reducing the complexity of the search.
[0092] In one embodiment, there is only node activity data of an unknown system, but no network topology. The method of this application can also be used to obtain the network dynamics formula and network topology of this unknown system. Specifically, the network topology can be regarded as a fully connected network with unknown weights, and the parameters By setting the parameter Adding a set of allowed mathematical symbols allows symbolic prediction models to guide the Monte Carlo tree search algorithm to search for During the search, The value of is determined dynamically during the simulation steps of the four-step Monte Carlo tree search algorithm: To obtain the square error MSE on the observed data, we first use the BFGS nonlinear optimization algorithm to Optimize to minimize the square error MSE of this formula on the observed data, and then use this minimized MSE as the square error of the formula on the observed data. After completing the search, the algorithm returns a The symbolic formula of , which is the network dynamics formula. Fitting this formula on the given node activity data, we get The parameter value is the network topology weight.
[0093] In summary, the method of the present application can accurately discover the network dynamics formula in a complex network system given the observation data on the complex network system, and effectively solve the problems in related technologies.
[0094] The symbol regression device provided in the present application is described below. The symbol regression device described below and the symbol regression method described above can be referenced to each other. Figure 7 This is a structural block diagram of a symbol regression device shown in an embodiment of the present application.
[0095] like Figure 7 As shown, a symbol regression device 700 provided by the present application may include the following modules: A first determining module 701 is configured to determine a target system to be subjected to symbolic regression, wherein the target system includes a plurality of different parameters, and a coupling relationship exists between the plurality of parameters; A first acquisition module 702 is configured to acquire a network topology of the target system and node activity data corresponding to nodes in the network topology, wherein the network topology includes a plurality of different nodes and connection relationships between the nodes, the nodes in the network topology represent parameters in the target system, and the node activity data is determined based on historical data corresponding to the plurality of parameters; An expansion module 703 is configured to obtain a network dynamics formula for fitting the relationship between various parameters in the target system, create a search tree using a symbolic regression method based on Monte Carlo tree search, and, in the process of expanding nodes in the search tree, predict unknown symbols in the formula corresponding to the nodes in the search tree based on the network topology, the node activity data, and a pre-trained symbol prediction model, where one node in the search tree corresponds to one formula; The second determining module 704 is configured to determine the network dynamics formula corresponding to the target system according to the search tree after the search tree is created.
[0096] According to a symbol regression device 700 provided by the present application, the search tree includes a target node, the target node includes a first unknown symbol, and the target node is a node in the search tree; the expansion module 703 includes: a first input submodule, configured to input the network topology, the node activity data, and a formula corresponding to the target node into the symbol prediction model to obtain a first probability distribution of a preset symbol set corresponding to the first unknown symbol, wherein the first probability distribution includes a probability of each symbol in the preset symbol set being the first unknown symbol; A first determination submodule is configured to determine, based on the first probability distribution, a candidate child node to be expanded with the target node as a parent node, wherein a formula corresponding to the candidate child node is generated based on a symbol with the highest probability in the preset symbol set; The expansion submodule is configured to add the candidate child node to the search tree if the candidate child node is not in the search tree, so as to expand the search tree.
[0097] According to a symbol regression device 700 provided by the present application, the expansion module 703 further includes: a second input submodule, configured to input the network topology, the node activity data, and the formula corresponding to the candidate subnode into the symbol prediction model if the formula corresponding to the candidate subnode includes a second unknown symbol, to obtain a second probability distribution of the preset symbol set corresponding to the second unknown symbol, where the second unknown symbol is different from the first unknown symbol; A second determining submodule is configured to determine that the symbol with the highest probability in the second probability distribution is the second unknown symbol, until a complete formula corresponding to the candidate child node is obtained; The third determination submodule is configured to determine a reward value corresponding to the complete formula, and based on the reward value, update the search tree through back propagation.
[0098] A symbol regression device 700 provided by the present application further includes a training module, wherein the training module includes: The second acquisition module is used to obtain a random sample symbol formula; a generating module, configured to generate a sample network topology structure corresponding to the random sample symbol formula, and generate sample node activity data according to the random sample symbol formula and the sample network topology structure; a third acquisition module, performing a truncating process on the prefix expression of the sample symbol formula to obtain a sample symbol at the truncated position and a subsample symbol formula preceding the sample symbol, wherein the subsample symbol formula includes a third unknown symbol, and the third unknown symbol is located at the truncated position; an input module, configured to input the subsample symbol formula, the sample network topology, and the sample node activity data into a preset neural network to obtain a predicted value corresponding to the third unknown symbol; An updating module, configured to obtain a cross entropy loss value between the predicted value and the sample symbol, and update the parameters of the preset neural network through back propagation according to the cross entropy loss value; The third determination module is used to determine the preset neural network obtained through training as the symbol prediction model when the training is completed.
[0099] According to a symbolic regression device 700 provided by the present application, the preset neural network includes an observation data encoder, a symbolic formula encoder, and a symbolic decoder. The symbolic decoder includes a transformer decoder and a multi-layer perceptron network. The input module is specifically used to: Inputting the sample network topology structure and the sample node activity data into the observation data encoder for feature extraction to obtain a first embedding vector; Inputting the subsample symbol formula into the symbol decoder to perform feature extraction to obtain a second embedding vector; Inputting the first embedding vector and the second embedding vector into the symbol decoder for feature decoding to obtain a third probability distribution corresponding to the third unknown symbol, the transformer decoder is used to obtain a decoding result based on the mutual attention between the first embedding vector and the second embedding vector, and the multilayer perceptron network is used to obtain the third probability distribution based on a flexible maximization activation function; The symbol with the highest probability in the third probability distribution is determined as the predicted value corresponding to the third unknown symbol.
[0100] According to a symbolic regression device 700 provided in this application, the observation data encoder includes a graph neural network and a transformer encoder, and the input module is further configured to: Performing multi-hot encoding on the sample node activity data to obtain an encoded feature matrix; Inputting the encoded feature matrix and the sample network topology structure into the graph neural network for message propagation to obtain a plurality of third embedding vectors; The plurality of third embedding vectors are sampled, and the sampling results are input into the transformer encoder for feature encoding to obtain the first embedding vector.
[0101] According to a symbolic regression device 700 provided by the present application, each node in the sample node activity data includes features of at least one dimension, and the sample node activity data includes a node feature matrix, an edge feature matrix, and a dependent variable feature matrix. The node feature matrix includes feature values of each node in the sample network topology structure in the at least one dimension, and the edge feature matrix includes values representing the relationship between different nodes in the sample network topology structure. The values in the dependent variable feature matrix are obtained by performing a time derivative of the features of each node in one dimension of the at least one dimension based on the node feature matrix and the edge feature matrix. The input module is further specifically used to: Multi-hot encoding is performed on the node feature matrix, the edge feature matrix, and the dependent variable feature matrix to obtain the encoded feature matrix.
[0102] According to a symbolic regression device provided by this application, the network dynamics formula follows the following rules: in, Represents the status of nodes in the network topology, Indicates the state changes of nodes in the network topology over time, is the autodynamics in network dynamics, is the interaction dynamics in network dynamics, is the starting point function, is the end point function, is the aggregation edge function, Used to extract the state value of the starting node of each edge in the network topology structure, Used to extract the state value of the end node of each edge in the network topology structure, Used to or The dimension of the result after the action is mapped back to the dimension before the action.
[0103] Figure 8 FIG. 1 is a schematic diagram of the physical structure of an electronic device according to an embodiment of the present application. Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call logic instructions in the memory 830 to execute a symbolic regression method.
[0104] In addition, the logical instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program code.
[0105] On the other hand, the present application also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a symbolic regression method provided by the above methods.
[0106] On the other hand, the present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform a symbolic regression method provided by the above methods.
[0107] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0108] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A symbolic regression method, characterized in that include: Determining a target system for symbolic regression, wherein the target system includes a plurality of different parameters, and a coupling relationship exists between the plurality of parameters; Obtaining a network topology of the target system and node activity data corresponding to nodes in the network topology, wherein the network topology includes a plurality of different nodes and connection relationships between the nodes, the nodes in the network topology represent parameters in the target system, and the node activity data is determined based on historical data corresponding to the plurality of parameters; With the goal of obtaining a network dynamics formula for fitting the relationship between various parameters in the target system, a search tree is created by a symbolic regression method based on Monte Carlo tree search, and in the process of expanding the nodes in the search tree, unknown symbols in the formula corresponding to the nodes in the search tree are predicted based on the network topology, the node activity data, and a pre-trained symbol prediction model, where one node in the search tree corresponds to one formula; After the search tree is created, the network dynamics formula corresponding to the target system is determined according to the search tree.
2. A symbolic regression method according to claim 1, characterized in that: The search tree includes a target node, the target node includes a first unknown symbol, and the target node is a node in the search tree; in the process of expanding the nodes in the search tree, predicting the unknown symbol in the formula corresponding to the node in the search tree according to the network topology, the node activity data, and a pre-trained symbol prediction model, including: Inputting the network topology, the node activity data, and a formula corresponding to the target node into the symbol prediction model to obtain a first probability distribution of a preset symbol set corresponding to the first unknown symbol, the first probability distribution including a probability of each symbol in the preset symbol set being the first unknown symbol; Determining, based on the first probability distribution, a candidate child node to be expanded with the target node as a parent node, wherein a formula corresponding to the candidate child node is generated based on a symbol with the highest probability in the preset symbol set; If the candidate child node is not in the search tree, the candidate child node is added to the search tree to expand the search tree.
3. A symbolic regression method according to claim 2, characterized in that: After adding the candidate child node to the search tree, the method further includes: If the formula corresponding to the candidate child node includes a second unknown symbol, inputting the network topology, the node activity data, and the formula corresponding to the candidate child node into the symbol prediction model to obtain a second probability distribution of the preset symbol set corresponding to the second unknown symbol, where the second unknown symbol is different from the first unknown symbol; Determine the symbol with the highest probability in the second probability distribution as the second unknown symbol, until a complete formula corresponding to the candidate child node is obtained; A reward value corresponding to the complete formula is determined, and based on the reward value, the search tree is updated through back propagation.
4. A symbolic regression method according to claim 1, characterized in that: The symbol prediction model is obtained by the following steps: Get random sample symbol formula; Generate a sample network topology structure corresponding to the random sample symbol formula, and generate sample node activity data based on the random sample symbol formula and the sample network topology structure; performing a cutting process on the prefix expression of the sample symbol formula to obtain a sample symbol at the cutting position and a subsample symbol formula preceding the sample symbol, wherein the subsample symbol formula includes a third unknown symbol, and the third unknown symbol is located at the cutting position; Inputting the subsample symbol formula, the sample network topology, and the sample node activity data into a preset neural network to obtain a predicted value corresponding to the third unknown symbol; Obtaining a cross entropy loss value between the predicted value and the sample symbol, and updating the parameters of the preset neural network through back propagation according to the cross entropy loss value; When the training is completed, the preset neural network obtained through training is determined as the symbol prediction model.
5. A symbolic regression method according to claim 4, characterized in that: The preset neural network includes an observation data encoder, a symbol formula encoder, and a symbol decoder, wherein the symbol decoder includes a transformer decoder and a multi-layer perceptron network; inputting the subsample symbol formula, the sample network topology, and the sample node activity data into the preset neural network to obtain a predicted value corresponding to the third unknown symbol includes: Inputting the sample network topology structure and the sample node activity data into the observation data encoder for feature extraction to obtain a first embedding vector; Inputting the subsample symbol formula into the symbol decoder to perform feature extraction to obtain a second embedding vector; Inputting the first embedding vector and the second embedding vector into the symbol decoder for feature decoding to obtain a third probability distribution corresponding to the third unknown symbol, the transformer decoder is used to obtain a decoding result based on the mutual attention between the first embedding vector and the second embedding vector, and the multilayer perceptron network is used to obtain the third probability distribution based on a flexible maximization activation function; The symbol with the highest probability in the third probability distribution is determined as the predicted value corresponding to the third unknown symbol.
6. A symbolic regression method according to claim 5, characterized in that: The observation data encoder includes a graph neural network and a transformer encoder, and the sample network topology structure and the sample node activity data are input into the observation data encoder for feature extraction to obtain a first embedding vector, including: Performing multi-hot encoding on the sample node activity data to obtain an encoded feature matrix; Inputting the encoded feature matrix and the sample network topology structure into the graph neural network for message propagation to obtain a plurality of third embedding vectors; The multiple third embedding vectors are sampled, and the sampling results are input into the transformer encoder for feature encoding to obtain the first embedding vector.
7. A symbolic regression method according to claim 6, characterized in that: Each node in the sample node activity data includes features of at least one dimension, the sample node activity data includes a node feature matrix, an edge feature matrix, and a dependent variable feature matrix, the node feature matrix includes feature values of each node in the sample network topology structure in the at least one dimension, the edge feature matrix includes values representing relationships between different nodes in the sample network topology structure, and the values in the dependent variable feature matrix are obtained by performing a time derivative of the features of each node in one dimension of the at least one dimension based on the node feature matrix and the edge feature matrix; the multi-hot encoding of the sample node activity data to obtain the encoded feature matrix includes: Multi-hot encoding is performed on the node feature matrix, the edge feature matrix, and the dependent variable feature matrix to obtain the encoded feature matrix.
8. A symbolic regression method according to any one of claims 1 to 7, characterized in that: The network dynamics formula uses the network dynamics operator 、 as well as Description, the network dynamics formula is as follows: in, Represents the status of nodes in the network topology, Indicates the state changes of nodes in the network topology over time, is the autodynamics in network dynamics, is the interaction dynamics in network dynamics, is the starting point function, is the end point function, is the aggregation edge function, Used to extract the state value of the starting node of each edge in the network topology structure, Used to extract the state value of the end node of each edge in the network topology structure, Used to or The dimension of the result after the action is mapped back to the dimension before the action.
9. A symbol regression device, characterized in that: include: A first determining module is used to determine a target system to be subjected to symbolic regression, wherein the target system includes a plurality of different parameters, and a coupling relationship exists between the plurality of parameters; a first acquisition module, configured to acquire a network topology of the target system and node activity data corresponding to nodes in the network topology, wherein the network topology includes a plurality of different nodes and connection relationships between the nodes, the nodes in the network topology represent parameters in the target system, and the node activity data is determined based on historical data corresponding to the plurality of parameters; an expansion module configured to obtain a network dynamics formula for fitting the relationship between various parameters in the target system, create a search tree using a symbolic regression method based on Monte Carlo tree search, and, in the process of expanding nodes in the search tree, predict unknown symbols in the formula corresponding to the nodes in the search tree based on the network topology, the node activity data, and a pre-trained symbol prediction model, where one node in the search tree corresponds to one formula; The second determining module is configured to determine the network dynamics formula corresponding to the target system according to the search tree after completing the creation of the search tree.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the symbolic regression method according to any one of claims 1 to 8 is implemented.