Symbol regression method based on multiform genetic programming
By introducing multi-form methods, adaptive resource allocation, and knowledge transfer strategies into genetic programming, the limitations of single-form genetic programming in complex symbolic regression problems are solved, global search capabilities and model performance are improved, and more efficient symbols are achieved. Return effect.
Patent Information
- Application Number
- CN202411337188.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-10-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing single-form genetic programming methods have limitations when dealing with complex symbolic regression problems. They are difficult to cover a wider solution space, resulting in limited global search capabilities and easy falling into local optimal solutions, which reduces the generalization ability and prediction accuracy of the model. degree, especially when facing high-dimensional data or data sets with strong non-linear relationships.
Using a method based on multi-form genetic programming, by constructing multiple equivalent problems and assigning independent sub-populations to each equivalent form, using solvers for search and adaptive evaluation, introducing adaptive resource allocation and knowledge transfer strategies, Enhance the global search capability of the algorithm.
It improves the efficiency and accuracy of symbolic regression, enhances global search capabilities in complex data relationship modeling, and significantly improves model performance and prediction accuracy.
Smart Images

Figure CN118862016A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and more particularly to a symbolic regression method based on multi-form genetic programming. Background Art
[0002] In the field of data processing, understanding and revealing the intrinsic relationship between data is crucial for both scientific research and industrial applications. Symbolic regression is a key technology in this field, which aims to find mathematical expressions that can describe the relationship between independent variables and dependent variables in a data set. These expressions are usually constructed through a series of mathematical operations, such as addition, subtraction, multiplication, division, exponentiation, logarithm, etc., so that the newly constructed model can better predict or classify data.
[0003] Genetic programming (GP), as an automated problem-solving and optimization method, has been widely used in symbolic regression problems. It draws on the principle of natural selection and searches in the possible solution space in an iterative way to find a suitable mathematical expression. The core idea of GP is to continuously evolve individuals through genetic operations such as mutation and crossover in order to find the optimal solution to the problem.
[0004] However, existing genetic programming methods mainly focus on a single form of search strategy, that is, finding the optimal solution in a fixed search space. Although this single form of search strategy is simple to implement, it has limitations when dealing with complex symbolic regression problems. Due to the limitation of the search space, traditional GP methods often find it difficult to cover a wider solution space, resulting in limited global search capabilities and inability to effectively explore potential better solutions.
[0005] In addition, when faced with high-dimensional data or data sets with strong nonlinear relationships, a single form of genetic programming method is prone to fall into a local optimal solution, reducing the generalization ability and prediction accuracy of the model.
[0006] Therefore, how to improve the global search capability of genetic programming in symbolic regression problems has become a hot topic and difficulty in current research. Summary of the invention
[0007] In view of this, the present invention provides a symbolic regression method based on multi-form genetic programming, aiming to overcome the limitations of the prior art and improve the efficiency and accuracy of symbolic regression, especially in solving complex data relationship modeling problems.
[0008] In order to achieve the above object, the present invention adopts the following technical solution:
[0009] A symbolic regression method based on polymorphic genetic programming, comprising:
[0010] Identify the original problem and construct multiple equivalent problems based on the original problem;
[0011] Based on the equivalence problem, determine the equivalent form;
[0012] Assign independent subpopulations to each equivalent form, and use solvers to search and evaluate adaptability respectively;
[0013] Determine whether the fitness value reaches the termination condition. If so, output the individual with the smallest fitness value among the three sub-populations. The expression can be obtained after the individual conversion code;
[0014] If not, the population resources are adaptively allocated based on the optimal individual fitness, and knowledge transfer is performed on the population.
[0015] Preferably, equivalent forms include primitive equations, explicit equations and implicit equations.
[0016] Preferably, the primitive equations, explicit equations and implicit equations have the following constraint relationships:
[0017] The primitive equation can be converted into an explicit equation by taking derivatives;
[0018] The explicit equation can be converted into an implicit equation by shifting it.
[0019] Preferably, the fitness evaluation function corresponding to the primitive equation is:
[0020]
[0021] In the formula, represents the number of primitive equation subpopulations, represents the predicted value of the primitive equation subpopulation, which is obtained through the derivative form corresponding to the primitive equation subpopulation, represents the true value, The sequence number representing the primitive equation subpopulation.
[0022] Preferably, the fitness evaluation function corresponding to the explicit equation is:
[0023]
[0024] In the formula, represents the number of explicit equation subpopulations, represents the predicted value of the explicit equation subpopulation, represents the true value, The index of the explicit equation subpopulation.
[0025] Preferably, the fitness evaluation function corresponding to the implicit equation is:
[0026]
[0027] In the formula, represents the number of primitive equation subpopulations, represents the predicted value of the implicit equation subpopulation, which is obtained based on the iterative bisection method through the display function corresponding to the implicit equation subpopulation. Represents the output value of the primitive equation, The index of the implicit equation subpopulation.
[0028] Preferably, adaptive allocation of population resources is performed based on optimal individual fitness, including:
[0029] The fitness is evaluated every m generations, and population resources are adaptively allocated according to the optimal individual fitness.
[0030] Preferably, population resources are adaptively allocated periodically, including:
[0031] Based on the fitness value of the best individual in each subpopulation, determine the best subpopulation; and increase the number of the best subpopulation , the number of other sub-populations decreased .
[0032] Preferably, Set to 2;
[0033] Each sub-population sets a minimum population size P_min. When the population size of a sub-population is reduced to P_min, even if its performance is not good, its population size will not be reduced any further. Preferably, P_{min} is set to half of the initial sub-population size.
[0034] As a preferred method, knowledge transfer is performed on the population, including:
[0035] After converting the best individual in the subpopulation corresponding to the primitive equation into an explicit form, replace the worst individual in the subpopulation corresponding to the explicit equation;
[0036] And after converting the best individual in the subpopulation corresponding to the explicit equation into an implicit form, replace the worst individual in the subpopulation corresponding to the implicit equation.
[0037] It can be seen from the above technical solutions that the present invention discloses a symbolic regression method based on multi-form genetic programming. Compared with the prior art, the present application integrates the multi-form optimization paradigm into genetic programming to form a universal multi-form GP framework, which can speed up the search speed and improve the performance of GP in dealing with complex SR problems.
[0038] At the same time, the present invention can enhance the global search capability of the algorithm by introducing different search strategies such as adaptive resource allocation and knowledge migration, so as to better adapt to the requirements of various complex data sets. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0040] Figure 1 The figure is a flow chart of the symbolic regression method based on multi-form genetic programming of the present invention;
[0041] Figure 2 It is a conversion relationship diagram of three equivalent forms of the present invention;
[0042] Figure 3 Schematic diagram of chromosome coding transfer of three equivalent forms of the present invention;
[0043] Figure 4 The experimental comparison results of solving multiple problems with multiple forms and single forms of the present invention are shown;
[0044] Figure 5 It is a comparison diagram of the fitness value convergence curves of the multi-form and single-form of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] The embodiment of the present invention discloses a symbolic regression method based on multi-form genetic programming. The core idea is to construct multiple forms and collaboratively solve the same problem to avoid falling into local optimality using a single form of genetic programming method. Furthermore, when solving the same problem, the knowledge between different forms can be shared between solvers to improve the diversity and efficiency of the search. At the same time, the application designs an adaptive resource control mechanism for adaptively allocating computing resources according to the problem-solving efficiency of different solvers, thereby further improving the search efficiency.
[0047] In one embodiment, the symbolic regression method based on multi-form genetic programming is implemented by the following steps:
[0048] Identify the original problem and construct multiple equivalent problems based on the original problem;
[0049] Based on the equivalence problem, determine the equivalent form;
[0050] Assign independent subpopulations to each equivalent form, and use solvers to search and evaluate adaptability respectively;
[0051] Determine whether the fitness value reaches the termination condition. If so, output the expression; that is, output the individual with the smallest fitness value among the three sub-populations. The expression can be obtained by individual conversion coding;
[0052] If not, the population resources are adaptively allocated based on the optimal individual fitness, and knowledge transfer is performed on the population.
[0053] In an exemplary embodiment, referring to Figure 1 ,The multi-form genetic programming framework mainly includes four parts: equivalent form construction, ,evolutionary solver selection, dynamic resource allocation and adaptive ,knowledge transfer components.
[0054] In this embodiment, in order to improve the diversity of the population, multiple different problem representations are integrated into the same algorithm, including:
[0055] First, the original problem Modeled as multiple equivalent problems, namely
[0056]
[0057] in It is Equivalence problems, each of which can highlight some features of the original problem, n is the number of equivalent problems, it should be noted that the original problem Can be one of the.
[0058] Secondly, based on the equivalent problem, the equivalent form F is determined. In this embodiment, the original problem is modeled into three different representation forms based on multi-form gene expression programming, in addition to the explicit function directly searched In addition to the form, the equivalent form also includes the primitive equation Form and Implicit Equations form.
[0059] That is, in this application, equivalent forms may include: primitive equations, explicit equations, and implicit equations;
[0060] in, Figure 2 It is the conversion relationship diagram of three equivalent forms. Figure 3 The schematic diagram of chromosome encoding transfer in three equivalent forms is shown in FIG. 1 , that is, the primitive equation, explicit equation and implicit equation in the present invention have the following constraint relationship:
[0061] The original function equation can be transformed into an explicit function form through derivative operations.
[0062] Explicit functions can be turned into implicit equations by shifting them.
[0063] The present application can significantly improve the individual diversity of the evolutionary algorithm by constructing different equivalent forms, thereby reducing the possibility of falling into local optimality.
[0064] Specifically, Figure 4 The advantages of the multi-format of this application over the single format are shown. Figure 4 It can be seen that on some complex problems, the performance of multi-modality is obviously better than that of single-modality.
[0065] Furthermore, each equivalent form is assigned an independent subpopulation E i , subpopulation E i Perform independent evolution, the evolution process is to use the solver to search and perform adaptability evaluation.
[0066] In one embodiment, for the primitive equation form, the fitness value is the average value of the difference between its derivative value and the output value. That is, after deriving the expression of the primitive function form, its derivative expression (i.e., explicit function equation) is obtained and then the RMSE value is calculated. The formula is expressed as:
[0067]
[0068] In the formula, represents the number of primitive equation subpopulations, represents the predicted value of the primitive equation subpopulation, which is obtained through the derivative form corresponding to the primitive equation subpopulation, represents the true value, The sequence number representing the primitive equation subpopulation.
[0069] For explicit equations, the fitness evaluation function is the fitting accuracy between the predicted output and the ground truth output, which is obtained by calculating the RMSE. The calculation formula is:
[0070]
[0071] In the formula, represents the number of explicit equation subpopulations, represents the predicted value of the explicit equation subpopulation, represents the true value, The index of the explicit equation subpopulation.
[0072] For implicit equations, this embodiment provides a new evaluation mechanism:
[0073] According to the zero point theorem, if the function f takes opposite sign values at the endpoints of the interval [a, b], that is, f(a)f(b)<0, then there must be at least one zero point in the interval. If the value of x is known, the variable can be regarded as a constant C. Therefore, the implicit function F(C; Y)=0 can be transformed into an explicit function g(Y)=0.
[0074] Then, the zero point theorem can be used to solve. Specifically, the iterative bisection method can be used to approximate the zero point to determine the value of y. Further, the corresponding fitness value is calculated according to the following formula:
[0075]
[0076] In the formula, represents the number of primitive equation subpopulations, represents the predicted value of the implicit equation subpopulation, which is obtained based on the iterative bisection method through the display function corresponding to the implicit equation subpopulation. Represents the output value of the primitive equation, The index of the implicit equation subpopulation.
[0077] Figure 5 The convergence of the minimum fitness value when solving problems in multiple forms and single forms is shown. It can be clearly seen that the fitness value of multiple forms converges faster and has a smaller convergence value.
[0078] In a preferred embodiment, whether to output the expression is determined by judging the fitness value;
[0079] Specifically, it includes judging whether the fitness value reaches the termination condition. If so, outputting the individual with the smallest fitness value among the three sub-populations. The expression can be obtained after the individual conversion code is obtained.
[0080] If not, the population resources are adaptively allocated based on the optimal individual fitness, and knowledge transfer is performed on the population.
[0081] In this embodiment, in order to improve the search efficiency of the model, the application allocates resources in three forms. During the evolution process, the performance of each sub-population is regularly evaluated to adjust the size of each sub-population. For example, the fitness is evaluated every m generations, and the population resources are adaptively allocated according to the optimal individual fitness. The allocation method is:
[0082] Based on the fitness value of the best individual in each subpopulation, the best subpopulation is determined; and the number of the best subpopulation is increased and the number of other subpopulations is reduced.
[0083] In one embodiment, the fitness value of the best individual in each subpopulation is used as the performance indicator, and an evaluation is performed every 10 generations. The size of the best subpopulation will increase by 2, while the sizes of other subpopulations will decrease.
[0084] Furthermore, the knowledge transfer of the population in the present application is one-way, that is, the knowledge is transferred from the sub-population in the form of primitive functions to the sub-population in the form of explicit functions, and then from the sub-population in the form of explicit functions to the sub-population in the form of implicit functions.
[0085] Specific migration methods include:
[0086] After converting the best individual in the subpopulation corresponding to the primitive equation into an explicit form, replace the worst individual in the subpopulation corresponding to the explicit equation;
[0087] And after converting the best individual in the subpopulation corresponding to the explicit equation into an implicit form, replace the worst individual in the subpopulation corresponding to the implicit equation.
[0088] The knowledge migration strategy of the present invention can further improve the search efficiency.
[0089] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0090] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A symbolic regression method based on multi-form genetic programming, It is characterized in that include: Identify the original problem and construct multiple equivalent problems based on the original problem; Based on the equivalence problem, determine the equivalent form; Assign independent subpopulations to each equivalent form, and use solvers to search and evaluate adaptability respectively; Determine whether the fitness value reaches the termination condition, if so, output the expression; If not, the population resources are adaptively allocated based on the optimal individual fitness, and knowledge transfer is performed on the three sub-populations.
2. A symbolic regression method based on multi-form genetic programming according to claim 1, It is characterized in that Equivalent forms include primitive equations, explicit equations, and implicit equations.
3. A symbolic regression method based on multi-form genetic programming according to claim 2, It is characterized in that Primitive equations, explicit equations, and implicit equations have the following constraints: The primitive equation can be converted into an explicit equation by taking derivatives; The explicit equation can be converted into an implicit equation by shifting it.
4. A symbolic regression method based on multi-form genetic programming according to claim 2, It is characterized in that The fitness evaluation function corresponding to the primitive equation is: ; In the formula, represents the number of primitive equation subpopulations, represents the predicted value of the primitive equation subpopulation, which is obtained through the derivative form corresponding to the primitive equation subpopulation, represents the true value, The sequence number representing the primitive equation subpopulation.
5. A symbolic regression method based on multi-form genetic programming according to claim 2, It is characterized in that The fitness evaluation function corresponding to the explicit equation is: ; In the formula, represents the number of explicit equation subpopulations, represents the predicted value of the explicit equation subpopulation, represents the true value, The index of the explicit equation subpopulation.
6. A symbolic regression method based on multi-form genetic programming according to claim 2, It is characterized in that The fitness evaluation function corresponding to the implicit equation is: ; In the formula, represents the number of primitive equation subpopulations, represents the predicted value of the implicit equation subpopulation, which is obtained based on the iterative bisection method through the display function corresponding to the implicit equation subpopulation. Represents the output value of the primitive equation, The index of the implicit equation subpopulation.
7. A symbolic regression method based on multi-form genetic programming according to claim 1, It is characterized in that Regularly adaptively allocate population resources, including: The fitness is evaluated every m generations, and population resources are adaptively allocated according to the optimal individual fitness.
8. A symbolic regression method based on multi-form genetic programming according to claim 1, It is characterized in that Adaptive allocation of population resources based on optimal individual fitness, including: Based on the fitness value of the best individual in each subpopulation, determine the best subpopulation; and increase the number of the best subpopulation , the number of other sub-populations decreased .
9. A symbolic regression method based on multi-form genetic programming according to claim 1, It is characterized in that Transfer knowledge to the population, including: After converting the best individual in the subpopulation corresponding to the primitive equation into an explicit form, replace the worst individual in the subpopulation corresponding to the explicit equation; And after converting the best individual in the subpopulation corresponding to the explicit equation into an implicit form, replace the worst individual in the subpopulation corresponding to the implicit equation.
