A BP neural network parameter optimization method based on an improved ASO algorithm

By introducing Tent mapping, amplitude function and step size evolution factor into the ASO algorithm, the globality and convergence of the ASO algorithm are improved, and the accuracy and local optimization problems of the ASO algorithm when optimizing BP neural network parameters are solved, achieving more efficient BP neural network parameter optimization.

CN114330659BActive Publication Date: 2025-05-27LIAONING TECHNICAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111639305.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-05-27
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

During the optimization process, existing ASO algorithms have problems such as weak optimization accuracy and easy to fall into local optimality, making it difficult to effectively optimize the parameters of BP neural networks.

Method used

An improved ASO algorithm (IASO) is proposed to enhance the diversity of atomic populations and the globality and convergence of the algorithm by introducing Tent mapping, amplitude function and step length evolution factor, and optimize the initial weight and threshold of the BP neural network.

Benefits of technology

The improved ASO algorithm (IASO) significantly improves optimization accuracy and global performance in the BP neural network parameter optimization, and can more effectively build a high-performance BP neural network classification model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114330659B_ABST
    Figure CN114330659B_ABST
Patent Text Reader

Abstract

The present invention provides a method for optimizing the parameters of a BP neural network based on an improved ASO algorithm, which relates to the technical field of neural networks. The method first preprocesses the data set and initializes the parameters of the BP neural network, then uses the preprocessed data set to perform initial network training on the BP neural network to obtain network weights and thresholds, and performs real-value coding on the network weights and thresholds to form initial individuals, thereby obtaining an initial atomic population; and takes the training error of the BP neural network as the individual fitness value to obtain a fitness function; then uses the improved ASO algorithm to update the atomic population and calculates the individual fitness values in the updated atomic population using the fitness function; finally, updates the weights and thresholds of the BP neural network and uses the updated BP neural network to classify the data set. This method applies the improved ASO algorithm to the parameter optimization of the BP neural network, and shows higher classification performance when optimizing the parameters of the BP neural network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of neural networks, and in particular to a method for optimizing the parameters of a BP neural network based on an improved ASO algorithm. Background Technique

[0002] Almost all machine learning algorithms ultimately boil down to finding the extreme value of an objective function, that is, an optimization problem. Optimization mainly refers to a method of selecting a certain research plan to make the objective reach the optimal under certain condition restrictions.

[0003] Meta-heuristic algorithms refer to a class of algorithms in which researchers are inspired by bionics, obtain inspiration from random phenomena in nature, and combine random algorithms with local algorithms to solve complex optimization problems. The biggest improvement of such algorithms compared with heuristic algorithms lies in the introduction of the influence of random factors, so that the algorithm has a certain probability of jumping out of the local optimum and is more likely to obtain the global optimum solution of the problem. At the same time, since there are no special requirements for the objective function, initial value, etc., it has become one of the hot issues in the research of optimization problems. According to different algorithm inspiration mechanisms, meta-heuristic algorithms can be classified into two categories: algorithms that imitate biological processes and algorithms based on physical principles. Among them, algorithms that imitate biological processes can be further divided into two categories: evolutionary algorithms based on biological evolution and swarm intelligence algorithms based on the social behavior of animals. Evolutionary algorithms based on biological evolution are mainly represented by genetic algorithms (GA), and there are also evolution strategies (ES), memetic algorithms (MA), etc.; swarm intelligence algorithms based on the social behavior of animals are a hot topic in the research of meta-heuristic algorithms in recent years. There are particle swarm optimization algorithms (PSO) that simulate the foraging of bird flocks, crow search algorithms (CSA) based on the intelligent behavior of crows, salp swarm algorithms (SSA) that simulate the aggregation behavior of salps, butterfly optimization algorithms (BOA) that simulate the foraging and courtship behavior of butterflies, moth flame optimization algorithms (MFO) that simulate the flight behavior of moths, etc.; algorithms based on physical principles include simulated annealing algorithms (SA) that imitate solid annealing, gravitational search algorithms (GSA) that imitate the principle of universal gravitation, and multi-universe optimization algorithms (MVO) that imitate the concepts of black holes, white holes, and wormholes in the multi-universe theory.

[0004] The Atom Search Optimization (ASO) algorithm is a new physics-inspired intelligent meta-heuristic optimization algorithm based on atomic motion proposed by Zhao W et al. inspired by molecular dynamics. This algorithm mimics the motion of atoms controlled by interaction and binding forces. The interaction force generated by the Lennard-Jones (L-J) potential and the binding force generated by atomic covalent bonds act on the atoms together, causing atoms of different masses to have different velocities and accelerations, thereby continuously updating the positions of the atoms until the atoms reach the optimal position and the algorithm iteration is completed. Due to its simple inspiration mechanism, few parameters, strong exploration and exploitation capabilities, etc., it has been applied to many fields such as the estimation of dispersion coefficients in groundwater, the estimation of hydrogeological parameters, automatic clustering, and the parameter estimation of PEM fuel cell models.

[0005] The Atom Search Optimization (ASO) algorithm has the problems of weak optimization accuracy and being prone to falling into local optima, but usually what we hope to obtain is the global optimal solution. General heuristic algorithms are very likely to produce local optima, or it is simply impossible to verify whether the obtained optimal solution is global. This is because for large-scale systems or complex problems, general algorithms focus on solving from the local perspective to reduce the computational amount and algorithm complexity. Improving the convergence speed, solution accuracy, and the ability to jump out of local optima of the ASO algorithm is still the main research direction for using this algorithm to solve optimization problems. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a method for optimizing the parameters of a BP neural network based on an improved ASO algorithm to realize the optimization of the parameters of the BP neural network in view of the deficiencies of the above-mentioned prior art.

[0007] To solve the above technical problem, the technical solution adopted by the present invention is: A method for optimizing the parameters of a BP neural network based on an improved ASO algorithm, which optimizes the initial weights and thresholds of the BP neural network by improving the ASO algorithm (Improved ASO, i.e., IASO), and uses the training error of the BP neural network as the fitness value of an individual. Finally, the optimal initial weights and thresholds are selected to construct a BP neural network classification model, which specifically includes the following steps:

[0008] Step 1: Preprocess the data set and initialize the parameters of the BP neural network;

[0009] Let the data set be Dataset, and preprocess the data set Dataset; Initialize the number of nodes in the input layer of the BP neural network as a, the number of nodes in the hidden layer as b, the number of nodes in the output layer as c, and the dimension of the atomic individual as Dim, as shown in the following formula:

[0010] Dim = a × b + b + b × c + c

[0011] Step 2, weight and threshold parameter encoding: Use the preprocessed data set to perform initial network training on the BP neural network to obtain network weights and thresholds, and perform real-value encoding on the network weights and thresholds to form an initial individual, obtaining an initial atomic population;

[0012] Step 3, calculate the fitness of the initial atomic population: Use the training error of the BP neural network as the individual fitness value to obtain the fitness function f i (x), as shown in the following formula:

[0013]

[0014] In the formula, is the expected output value of the BP neural network, y i is the actual output value of the BP neural network, represents the training error of the BP neural network;

[0015] Step 4, optimize and update the atomic population: Use the improved ASO algorithm to update the atomic population and calculate the individual fitness values in the updated atomic population using the fitness function;

[0016] Step 4.1, initialize the atomic population using Tent mapping;

[0017] Starting from the initial solution distribution uniformity of the solution space, introduce Tent mapping to initialize the atomic population using the randomness and ergodicity of the chaotic sequence. The Tent mapping is shown in the following formula:

[0018]

[0019] Among them, x N is the worst group found through the detection mechanism, and x N+1 is the new group generated through Tent mapping;

[0020] After performing Bernoulli displacement transformation on the Tent mapping, we get:

[0021] x N+1 =(2x N ) mod 1

[0022] Among them, N is the number of atoms, and the size of the initial population is determined by the number of atoms N and the search space dimension D;

[0023] Step 4.2, optimize the depth function and Lagrange multiplier of the ASO algorithm using the amplitude function, and then redefine the acceleration of each atom during iteration;

[0024] The amplitude function is introduced to correct the depth function η(t) and the Lagrange multiplier λ(t) in the ASO algorithm. The introduced amplitude function s(t) is defined as:

[0025] s(t) = rand(|cos(d × t + N)|)

[0026] where N is the number of atoms, t is the number of iterations, d is the dimension of the atomic search space, and rand is a random function, which means randomly selecting one from the numbers generated by the amplitude function as the fluctuation factor that finally acts on the parameters η(t) and λ(t);

[0027] The amplitude function is corrected to obtain the corrected amplitude function as:

[0028] s′(t) = rand(|cos(d × t + N)|) + 1

[0029] The depth function η(t) and the Lagrange multiplier λ(t) after the action of the amplitude function are redefined as:

[0030]

[0031]

[0032] In the formula, s(t) is called the amplitude factor, α is the depth weight, β is the multiplier weight, and T is the maximum number of iterations;

[0033] Furthermore, the acceleration of the i-th atom at the t-th iteration is redefined as:

[0034]

[0035] In the formula, is the position of the i-th atom at the t-th iteration in the d-th dimension, is the acceleration of the i-th atom at the t-th iteration in the d-th dimension, is the mass of the i-th atom at the t-th iteration in the d-th dimension; h ij (t) is the distance between two atoms, and rand ij is a random number in [0, 1], and Kbest is a subset of the atomic population, which consists of the first k atoms with the best function fitness values;

[0036] Step 4.3: Introduce a step size evolution factor to correct the atomic position update formula, so that the atomic position update process gradually slows down until it no longer changes as the number of iterations increases;

[0037] The step size evolution factor ω(t) is introduced to correct the atomic position update formula, so that the atomic position update process gradually slows down until it no longer changes as the number of iterations increases. ω(t) is defined as:

[0038]

[0039] Wherein, t is the number of iterations, d is the dimension of the atomic search space, and T is the maximum number of iterations;

[0040] The new atomic position update strategy is obtained as follows:

[0041]

[0042]

[0043] Among them, is the position of the i-th atom at the t-th iteration, is the position of the i-th atom at the (t + 1)-th iteration, is the velocity of the i-th atom at the (t + 1)-th iteration, and ω(t) is the step size evolution factor simulating the atomic position update process;

[0044] Step 5, determine whether the termination condition is satisfied, that is, whether the given maximum number of iterations is reached. If satisfied, output the optimal individual x i and the optimal weight ω and threshold b; otherwise, jump back to Step 4 to continue the optimization;

[0045] Step 6, update the weight ω and threshold b of the BP neural network and classify the data set using the updated BP neural network.

[0046] The beneficial effects of adopting the above technical solutions are as follows: An improved ASO algorithm-based BP neural network parameter optimization method provided by the present invention proposes an improved ASO algorithm that simulates the atomic position update process by integrating chaotic optimization, amplitude random compensation, and step size evolution mechanism from the perspectives of atomic swarm diversity, model parameter setting, and atomic position update, and applies it to the optimization of BP neural network parameters; the improved ASO algorithm has better optimization accuracy and global performance compared with the traditional ASO algorithm, and shows higher classification performance when optimizing the parameters of the BP neural network. Description of the Drawings

[0047] Figure 1 is a flowchart of an improved ASO algorithm-based BP neural network parameter optimization method provided by an embodiment of the present invention;

[0048] Figure 2 is a comparative experimental graph of the method of the present invention and different algorithms for benchmark test functions in 30 dimensions and 100 dimensions; wherein, (a), (b), (c), (d) are the benchmark test functions f 2 f 4 f 6, f 8 Comparison experiment diagrams of (e), (f), (g), and (h) are the comparison experiment diagrams of different algorithms for the benchmark function f at 100 dimensions respectively 2 , f 4 , f 6 , f 8 ;

[0049] Figure 3 This is the comparison experiment diagram provided by the embodiment of the present invention for simulating 10 classic mixed multi-dimensional benchmark functions with BOA, MFO, MVO, SSA, and ASO as experimental comparison algorithms. Among them, (a), (b), (c), and (d) are the comparison experiment diagrams of different algorithms for the benchmark function f at 100 dimensions respectively 12 , f 14 , f 16 , f 18 ;

[0050] Figure 4 This is the time comparison analysis diagram of the method of the present invention provided by the embodiment of the present invention. Among them, (a) and (b) respectively represent the average running times of 6 algorithms for the benchmark functions f 2 , f 4 , f 6 , f 8 , f 10 at 30 and 100 dimensions, (c) represents the average running times of 6 algorithms for the benchmark functions f 12 , f 14 , f 16 , f 18 , f 20 on, and (d) represents the sum of the average running times of 6 algorithms for 20 benchmark functions at 30 and 100 dimensions. Detailed implementation manners

[0051] The following will further describe in detail the specific implementation manners of the present invention in conjunction with the drawings and embodiments. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention.

[0052] In this embodiment, a method for optimizing the parameters of a BP neural network based on an improved ASO algorithm optimizes the initial weights and thresholds of the BP neural network through the improved ASO (IASO) algorithm, and uses the training error of the BP neural network as the fitness value of an individual. Finally, the optimal initial weights and thresholds are selected to construct a BP neural network classification model, as Figure 1 shown, and specifically includes the following steps:

[0053] Step 1: Preprocess the data set and initialize the parameters of the BP neural network;

[0054] Let the dataset be Dataset, and perform normalization and null value deletion on the dataset; initialize the input layer nodes of the BP neural network as a, the hidden layer nodes as b, the output layer nodes as c, and the atomic individual dimension as Dim, as shown in the following formula:

[0055] Dim = a × b + b + b × c + c

[0056] Step 2: Encode weight and threshold parameters; use the preprocessed dataset to perform initial network training on the BP neural network to obtain network weights and thresholds, and perform real-value encoding on the network weights and thresholds to form initial individuals, obtaining an initial atomic population;

[0057] Step 3: Calculate the fitness of the initial atomic population; use the training error of the BP neural network as the individual fitness value to obtain the fitness function f i (x), as shown in the following formula:

[0058]

[0059] In the formula, is the expected output value of the BP neural network, y i is the actual output value of the BP neural network, represents the training error of the BP neural network;

[0060] Step 4: Optimize and update the atomic population; update the atomic population according to the improved ASO algorithm and calculate the individual fitness values in the updated atomic population using the fitness function;

[0061] Step 4.1: Initialize the atomic population using Tent mapping;

[0062] Starting from the initial solution distribution uniformity of the solution space, introduce Tent mapping to initialize the atomic population using the randomness and ergodicity of the chaotic sequence. The Tent mapping is shown in the following formula:

[0063]

[0064] Among them, x N is the worst group found through the detection mechanism, and x N+1 is the new group generated through Tent mapping;

[0065] After performing Bernoulli displacement transformation on the Tent mapping, we get:

[0066] x N+1 =(2x N ) mod 1

[0067] Among them, N is the number of atoms, and the size of the initial population is determined by the number of atoms N and the search space dimension D;

[0068] Step 4.2: Optimize the depth function and Lagrange multiplier of the ASO algorithm using the amplitude function, and then re-define the acceleration of each atom during iteration;

[0069] To improve the global exploration ability of the algorithm, inspired by simple harmonic vibration, an amplitude function is introduced to correct the depth function η(t) and Lagrange multiplier λ(t) in the ASO algorithm. The property of the amplitude function's fluctuating jump is used to enhance the possibility of the algorithm jumping out of the local optimum; the introduced amplitude function s(t) is defined as:

[0070] s(t) = rand(|cos(d × t + N)|)

[0071] where N is the number of atoms, t is the number of iterations, d is the dimension of the atom search space, and rand is a random function, indicating randomly selecting one from the numbers generated by the amplitude function as the fluctuation factor that finally acts on the parameters η(t) and λ(t);

[0072] According to the fluctuating property of the amplitude function, it is easy to know that when the amplitude factor is introduced to correct the parameters in the algorithm, the parameters inherit its jumping volatility, strengthening the possibility of the algorithm jumping out of the local optimum; however, since the introduced amplitude factor belongs to [0,1], the search step size only explores and develops within the neighborhood of the original solution, and the exploration of the entire global solution space is not strong enough. Therefore, the amplitude function is corrected, and the corrected amplitude function is:

[0073] s′(t) = rand(|cos(d × t + N)|) + 1

[0074] The depth function η(t) and Lagrange multiplier λ(t) after the action of the amplitude function are re-defined as:

[0075]

[0076]

[0077] In the formula, s(t) is called the amplitude factor, α is the depth weight, β is the multiplier weight, and T is the maximum number of iterations;

[0078] Furthermore, the acceleration of the i-th atom at the t-th iteration is re-defined as:

[0079]

[0080] In the formula, is the position of the i-th atom in the d-th dimension at the t-th iteration, is the acceleration of the i-th atom in the d-th dimension at the t-th iteration, is the mass of the i-th atom in the d-th dimension at the t-th iteration; h ij(t) is the distance between two atoms, and rand ij is a random number in [0, 1], and Kbest is a subset of the atomic population, consisting of the first k atoms with the best function fitness values;

[0081] For the ASO algorithm, its basic theory mainly includes three parts: the atomic motion constraint equation, the interaction force generated by the L-J potential, and the binding force caused by the bond growth tendency;

[0082] (1) Atomic motion constraint equation:

[0083]

[0084] Among them, is the interaction force generated by the L-J potential for the i-th atom in the d-th dimension at the t-th iteration, is the binding force generated by the covalent bond of the i-th atom in the d-th dimension at the t-th iteration; is the acceleration of the i-th atom at the t-th iteration;

[0085]

[0086] Among them, is the mass of the i-th atom in the d-th dimension at the t-th iteration, which can be calculated through the function fitness value of the i-th atom, expressed as

[0087]

[0088] Among them,

[0089] For the minimization problem, Fit i (t) is the function fitness value of the i-th atom at the t-th iteration, and respectively represent the objective function fitness values of the worst atom and the best atom at the t-th iteration.

[0090] (2) Interaction force generated by the L-J potential:

[0091] To ensure the global effectiveness of the ASO algorithm, the lower limit of the repulsive force with a smaller function value h ij (t) is set to h = 1.1, and the upper limit of the attractive force with a larger function value is set to h = 1.24, that is, the distance h ij (t) between two atoms is shown in the following formula:

[0092]

[0093] Among them, h min and h maxSpecifically, the lower and upper limits of h, and the length scale

[0094]

[0095]

[0096] where Kbest is a subset of the overall atoms, consisting of the top k atoms with the best function fitness values, and g 0 is the initial drift operator, and g(t) is the drift operator that ensures the global nature of the algorithm, expressed as

[0097]

[0098] Therefore, the mutual force generated by the L-J potential is

[0099]

[0100] where d represents the current search space dimension and d = 1, 2, …, D, and rand ij is a random number in [0, 1].

[0101] (2) The binding force caused by the bond length:

[0102] In the ASO algorithm, assuming that each atom has a covalent bond with the best atom and each atom is subject to the binding force from the best atom, then the constraint θ i (t) of the i-th atom is

[0103]

[0104] where x best (t) is the position of the best atom at the t-th iteration, and b i,best is the fixed bond length between the i-th atom and the best atom. Therefore, the binding force of the i-th atom is

[0105]

[0106] where λ(t) is the Lagrange multiplier. Let 2λ → λ, then the binding force caused by the covalent bond can be redefined as

[0107]

[0108] where β is the multiplier weight; therefore, under the mutual force and geometric constraint, the acceleration of the i-th atom at time t is

[0109]

[0110] To simplify the ASO algorithm, during the global optimization process of the algorithm, the position and velocity of the \(i\)-th atom in the \(d\)-th dimension at the \((t + 1)\)-th iteration are expressed as:

[0111]

[0112]

[0113] where \(d\) represents the current search space dimension and \(d = 1, 2, \ldots, D\). is the position of the \(i\)-th atom in the \(d\)-th dimension at the \(t\)-th iteration. is the acceleration of the \(i\)-th atom in the \(d\)-th dimension at the \(t\)-th iteration. is the velocity of the \(i\)-th atom in the \(d\)-th dimension at the \((t + 1)\)-th iteration.

[0114] Step 4.3: Introduce a step-size evolution factor to correct the atom position update formula, so that the atom position update process gradually slows down until it no longer changes as the number of iterations increases.

[0115] Introduce a step-size evolution factor \(\omega(t)\) to correct the atom position update formula, so that the atom position update process gradually slows down until it no longer changes as the number of iterations increases. \(\omega(t)\) is defined as:

[0116]

[0117] where \(t\) is the number of iterations, \(d\) is the atom search space dimension, and \(T\) is the maximum number of iterations.

[0118] Furthermore, the new atom position update strategy is obtained as:

[0119]

[0120] where is the position of the \(i\)-th atom at the \(t\)-th iteration. is the position of the \(i\)-th atom at the \((t + 1)\)-th iteration. is the velocity of the \(i\)-th atom at the \((t + 1)\)-th iteration, and \(\omega(t)\) is the step-size evolution factor simulating the atom position update process. In this embodiment, the execution pseudocode of the IASO algorithm is shown in Table 1:

[0121] Table 1 Execution Pseudocode of the IASO Algorithm

[0122]

[0123]

[0124] Step 5: Determine whether the termination condition is satisfied, that is, whether the given maximum number of iterations is reached. If satisfied, output the optimal individual \(x\). iand the optimal weight ω and threshold b; otherwise, jump to step 4 to continue the optimization;

[0125] Step 6: Update the weights ω and threshold b of the BP neural network and use the updated BP neural network to classify the dataset.

[0126] In this embodiment, to verify the effectiveness of the BP neural network parameter optimization method based on the improved ASO algorithm, 8 datasets are selected from the UCI dataset for numerical comparison experiments. The 8 datasets are the Dermatology dataset, Diabetes dataset, Bupa liver disease dataset, Glass dataset, Indian dataset, Leaf plant leaf dataset, Parkinson's dataset, and Pendigits handwritten digit dataset. The dataset information is shown in Table 2.

[0127] Table 2 Physical properties of 8 datasets in UCI

[0128] Dataset Number of classes Number of features Number of samples Training set Test set Dermatology 6 33 366 256 110 Diabetes 2 8 768 537 231 Bupa 2 6 345 241 104 Glass 6 9 214 149 65 Indian 2 8 583 408 175 Leaf 12 36 340 237 103 Parkinsons 5 22 529 136 59 Pendigits 10 17 461 7694 3298

[0129] In this embodiment, to ensure the objectivity and fairness of the experiment, for the same dataset, the initial parameters are: the maximum number of iterations is uniformly 20 times, the population size is 20, the weight and threshold boundary range is [-10, 10], and the ASO and IASO parameters are both α = 50 and β = 0.2. The BP algorithm, ASO-BP, and the IASO-BP method of the present invention are respectively used to perform 100 classification experiments on 8 datasets, and the mean (Mean), standard deviation (Std), maximum value (Max), and minimum value (Min) of the 100 experimental results are calculated as the final evaluation indicators of the experiment. The experimental results are shown in Table 3.

[0130] Table 3 Classification accuracies of different algorithms

[0131]

[0132]

[0133] As can be seen from the experimental results in Table 3: For the classification tasks of different datasets, overall, the numerical experimental results of the IASO-BP of the present invention have better superiority and stability compared with the BP neural network and ASO-BP. Among the 8 datasets, the mean of the classification accuracy of IASO-BP reached the highest, indicating that IASO-BP has better average performance; the standard deviation also reached the highest on most datasets, indicating that IASO-BP has higher stability compared with the BP neural network and ASO-BP; at the same time, the maximum and minimum indicators of IASO-BP in all datasets are also better than those of the BP neural network and ASO-BP. At the same time, from the comparison of the classification accuracy of the BP neural network, the classification accuracy of ASO-BP, and the classification accuracy of IASO-BP, it can be seen that optimizing the weight and threshold parameters of the BP neural network using the meta-heuristic algorithm can make the BP neural network model perform better. In summary, in the parameter optimization of the BP neural network and dataset classification, IASO-BP has better classification accuracy and robustness compared with the comparison algorithms. When using the two meta-heuristic algorithms of ASO and IASO to optimize the weight and threshold parameters of the neural network, the BP network model has higher accuracy and robustness.

[0134] At the same time, to verify that the improved ASO algorithm has higher convergence and global properties, 20 classical benchmark test functions are selected in this embodiment for numerical experiments, where f 1 -f 10 is a variable-dimensional benchmark test function (the optimal value of each group of test functions is 0, see Table 4); f 11 -f 20 is a classical benchmark test function of mixed multi-dimensions. The specific function names are as follows: f 11 : ShekelFoxholes1, f 12 : Kowalik, f 13 : Six-Hump, f 14 : Branin, f 15 : Goldstin-Price, f 16 : Hartman1, f 17 : Hartman 2, f 18 : shekel Foxholes2, f 19 : shekel Foxholes3, f 20 : shekel Foxholes4.

[0135] Table 4 Benchmark test functions

[0136]

[0137]

[0138] In this embodiment, to ensure the objectivity and fairness of the experiment, the population sizes of all comparison algorithms are uniformly set to 50, and the maximum number of iterations is uniformly set to 1000. Among them, the parameters of the ASO algorithm and the improved ASO algorithm are α = 50 and β = 0.2; each experimental group independently conducts 100 numerical experiments, and calculates the mean (Mean), standard deviation (Std), and the optimal value (Best) in the 100 experiments as the algorithm evaluation indicators.

[0139] In this embodiment, a total of three groups of experiments are designed:

[0140] (1) Conduct numerical experiment comparisons between IASO and 4 metaheuristic algorithms under 30 dimensions and 100 dimensions; that is, select 10 classic benchmark test functions and conduct comparison experiments with 4 metaheuristic algorithms under two dimensions respectively, and verify that the IASO algorithm has better optimization performance through the comparison of their numerical experiment results.

[0141] (2) Conduct comparison of the numerical experiment results between IASO and 4 metaheuristic algorithms under mixed multi-dimensional benchmark test functions; that is, select 10 classic benchmark test functions with mixed multi-dimensions and conduct comparison experiments with 4 metaheuristic algorithms, and verify that the IASO algorithm has better optimization performance through the comparison of their numerical experiment results.

[0142] (3) Conduct Wilcoxon rank-sum test and algorithm time comparison; that is, calculate the Wilcoxon rank-sum test p-value and statistically analyze the running time of each comparison algorithm, and verify that IASO has better stability and optimization than other algorithms through the numerical experiment results.

[0143] I. Comparative experiments of different algorithms under 30 and 100 dimensions

[0144] In this embodiment, to verify the optimization performance of the IASO algorithm, six metaheuristic algorithms, namely BOA, MFO, MVO, SSA, and the traditional ASO algorithm, are used as experimental comparison algorithms, and simulation comparison experiments are respectively conducted on 10 benchmark test functions under D = 30 dimensions and D = 100 dimensions. The parameter settings and evaluation indicators of the comparison algorithms are based on the above data, and the specific experimental statistical results are shown in Table 5.

[0145] It can be seen from Table 5 that compared with other metaheuristic algorithms, the improved ASO algorithm (IASO) of the present invention has better optimization performance.

[0146] (1) Under the same population size, number of iterations, and the same dimension, except for f 7 and f 9Outside the function, the calculation accuracy of IASO on the remaining benchmark functions is several or hundreds of orders of magnitude higher than that of the comparison algorithms, and even reaches the optimal value. The numerical experimental results show that IASO has better calculation effects and optimization capabilities. Although the Best index of IASO on the f 7 function is worse than that of the BOA algorithm, by comparing the Mean and Std indicators, it can be found that the stability of the IASO algorithm is higher than that of the BOA, further verifying the reliability and robustness of the IASO algorithm. At the same time, whether on unimodal functions (f 1 , f 3 and f 4 ) or multimodal functions (f 6 , f 8 and f 10 ), IASO has obtained the optimal calculation accuracy of the three indicators, indicating that IASO not only has stronger local development capabilities and convergence accuracy, but also has better global exploration capabilities.

[0147] (2) Under the same population size and number of iterations, but different dimensions, as can be seen from Table 5: There is no significant difference or even better results in the optimization results of IASO for 10 test functions under 30 and 100 dimensions (f 2 ). However, the optimization capabilities of the other 5 comparison algorithms at 100 dimensions are significantly weaker than those at 30 dimensions, indicating that the IASO algorithm shows better stability and applicability at high dimensions, demonstrating the superior search performance of IASO in solving high-dimensional functions.

[0148] (3) Through Figure 2 the iteration curves, it can be seen that whether under 30 or 100 dimensions, IASO shows better optimization capabilities and stability. From the iteration curves Figure 2 , it can be seen that the IASO algorithm not only shows good search performance in the early stage of iteration, but also can maintain this advantage until the algorithm iteration terminates until approaching the theoretical optimal value of the function. In summary, when conducting simulation experiments on 10 benchmark test functions with variable dimensions, IASO shows better convergence accuracy and local development capabilities in 100 independent repeated experiments, and has better global exploration capabilities and algorithm robustness.

[0149] Table 5 Comparison results of statistical indicators of 6 algorithms for 10 benchmark functions

[0150]

[0151]

[0152]

[0153] II. Comparative Experiments of Different Algorithms under Hybrid Multi-Dimensional Functions

[0154] To further evaluate the effectiveness and stability of IASO, BOA, MFO, MVO, SSA, and ASO were used as comparative experimental algorithms, and simulation comparative experiments were conducted on 10 classic hybrid multi-dimensional benchmark test functions. The parameter settings and evaluation indicators of the comparative algorithms were based on the above data, and the specific experimental statistical results are shown in Table 6.

[0155] As can be seen from Table 6, IASO has significant optimization effects on f 11 -f 17 and has found the optimal value of the function in terms of the Best index. However, its optimization effects on f 18 , f 19 and f 20 are weaker than those of the comparative algorithms. This is because IASO uses a non-linear fast convergence factor to accelerate the atomic position update equation, while the optimal values of the f 18 , f 19 and f 20 functions fluctuate within a small range, so it cannot jump out of the local optimum. If we want to increase the optimization accuracy of IASO on the f 18 , f 19 and f 20 functions, the function value of the fast convergence factor can be made to fluctuate around 1. However, at this time, the optimization accuracy of IASO on all other test functions will decrease. At the same time, from the Figure 3 iteration convergence curve, it can be seen that IASO shows better optimization ability and faster iteration speed in the iterative process of solving hybrid multi-dimensional functions. Therefore, overall, IASO shows better optimization performance compared to the other algorithms.

[0156] Table 6 Comparative Results of Statistical Indicators of 6 Algorithms for 10 Hybrid Multi-Dimensional Benchmark Functions

[0157]

[0158]

[0159] III. Wilcoxon Rank Sum Test

[0160] The mean and standard deviation calculated from 100 independent repeated experiments generally measure the superiority of the algorithm, but they cannot reflect the results of each run of the algorithm. To better evaluate the effectiveness and stability of the improved algorithm, Derrac et al. proposed that the algorithm should be subjected to statistical tests. In this embodiment, the Wilcoxon rank sum test was conducted at a 5% significance level and the f 2 , f 4 , f 6 , f 8, f 10 and the mixed multi - dimensional f 12 , f 14 , f 16 , f 18 , f 20 The p - values calculated in the Wilcoxon rank - sum test of IASO and other algorithms for f. For example, if the best algorithm is IASO, comparisons are made between IASO and ASO, IASO and BOA, etc. In Table 7, N / A means "not applicable", indicating that the corresponding algorithm can be compared with itself without statistical data in the rank - sum test; the symbols "+", "-", and "=" represent that the performance of IASO is better than, worse than, and equivalent to the comparison algorithm respectively; when the statistical test value p < 0.05, it is considered a strong verification for rejecting the null hypothesis, and the part with "-" in Table 7 indicates p > 0.05.

[0161] As can be seen from Table 7, IASO only has a p - value greater than 0.05 in the IASO vs. BOA for 30 - dimensional f 4 , while the p - values of the rank - sum test results on the test functions of all other comparison algorithms are less than 0.05. Generally speaking, IASO is statistically significant, that is, IASO has a higher convergence accuracy compared to the comparison algorithms.

[0162] Table 7 p - values of Wilcoxon rank - sum test for benchmark functions

[0163]

[0164] III. Time - contrast analysis

[0165] To a certain extent, the running time of the algorithm reflects the magnitude of the algorithm's time complexity. Therefore, in this embodiment, 100 independent repeated experiments were conducted on 6 different algorithms for 20 benchmark test functions, and the average running times of each algorithm for f 1 - f 10 at 30 - dimensional and 100 - dimensional, as well as the average running times of f 11 - f 20 under each algorithm were recorded. Figure 4 It shows the bar chart of the running times of 6 algorithms for some benchmark test functions.

[0166] Figure 4 (a), 4(b) respectively represent the average running times of 6 algorithms for f 2 , f 4 , f 6 , f 8 , f 10 at 30 - dimensional and 100 - dimensional. Figure 4 (c) represents the average running times of 6 algorithms for f 12 , f 14 , f 16,f 18 ,f 20 The average running time on Figure 4 (d) represents the sum of the average running times of six algorithms for 20 benchmark functions in 30 and 100 dimensions. As can be seen from Figure 4 (a), 4(b), 4(c), 4(d), among the five given test functions, the average running time of IASO under 100 independent repeated experiments is much higher than those of the BOA, MFO, MVO, and SSA algorithms. This is caused by ASO itself. The slightly higher average running time of IASO than that of ASO is due to the introduction of a non-linear factor during the improvement of the algorithm, resulting in an increase in the algorithm complexity. However, when the dimension increases, the increase in the average running time of IASO is smaller compared with the other comparison algorithms. This indicates that IASO is more suitable for solving high-dimensional test functions. At the same time, although the average running time of the IASO algorithm is slightly higher than that of the ASO algorithm, considering its optimization ability comprehensively, IASO has better optimization performance.

[0167] Aiming at the problems of weak optimization accuracy and easy falling into local extrema of the atomic optimization algorithm, this invention proposes an improved ASO algorithm (IASO) that combines chaotic optimization, amplitude random compensation, and step-size evolution mechanism from the perspectives of population diversity, parameter adaptability, and position dynamics, and successfully applies it to classification tasks. First, Tent chaos is introduced to enhance the uniformity of the distribution of the atomic population in the search space. Secondly, by constructing an amplitude function to randomly perturb the algorithm parameters and adding a step-size evolution factor to update the atomic positions, the global and convergence properties of the algorithm are enhanced. Compared with the numerical experiments of six meta-heuristic algorithms under 20 benchmark functions, the experimental results show that IASO not only has good optimization performance in solving multi-dimensional benchmark functions, but also has higher classification accuracy than two comparison algorithms when optimizing the parameters of the BP neural network.

[0168] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope defined by the claims of the present invention.

Claims

1. An optimization method for BP neural network parameters based on an improved ASO algorithm, characterized in that: the initial weights and thresholds of the BP neural network are optimized by an improved ASO algorithm, and the training error of the BP neural network is used as the fitness value of an individual. Finally, the optimal initial weights and thresholds are selected to construct a BP neural network classification model, which specifically includes the following steps: Step 1: Preprocess the data set and initialize the parameters of the BP neural network; the data set is the plant leaf data set Leaf in the UCI data set; Let the data set be Dataset, and preprocess the data set Dataset; initialize the input layer nodes of the BP neural network as a, the hidden layer nodes as b, the output layer nodes as c, and the atomic individual dimension as Dim, as shown in the following formula: Dim = a × b + b + b × c + c; Step 2: Encode the weight and threshold parameters; use the preprocessed data set to perform initial network training on the BP neural network to obtain network weights and thresholds, and perform real-value encoding on the network weights and thresholds to form an initial individual, obtaining an initial atomic population; Step 3: Calculate the fitness of the initial atomic population; use the training error of the BP neural network as the individual fitness value to obtain a fitness function; Step 4: Optimize and update the atomic population; use an improved ASO algorithm to update the atomic population and calculate the individual fitness values in the updated atomic population using the fitness function; Step 4.1: Initialize the atomic population using Tent mapping; Step 4.2: Optimize the depth function and Lagrange multiplier of the ASO algorithm using an amplitude function, and then redefine the acceleration of each atom during iteration; Step 4.3: Introduce a step-size evolution factor to correct the atom position update formula, so that the atom position update process gradually slows down until it no longer changes as the number of iterations increases; Step 5: Determine whether the termination condition is met, that is, whether the given maximum number of iterations is reached. If it is met, output the optimal individual and the optimal weights and thresholds; otherwise, jump to Step 4 to continue the optimization; Step 6: Update the weights and thresholds of the BP neural network and use the updated BP neural network to classify the data set.

2. An optimization method for BP neural network parameters based on an improved ASO algorithm according to claim 1, characterized in that: the fitness function in Step 3 is as shown in the following formula: where f i (x) is the fitness function, is the expected output value of the BP neural network, and y i is the actual output value of the BP neural network, represents the training error of the BP neural network.

3. An optimization method for BP neural network parameters based on an improved ASO algorithm according to claim 2, characterized in that: the specific method of Step 4.1 is: Starting from the initial solution distribution uniformity of the solution space, introduce Tent mapping to initialize the atomic population by using the randomness and ergodicity of the chaotic sequence. The Tent mapping is as shown in the following formula: Among them, x N is the worst group found through the detection mechanism, and x N+1 is the new group generated by Tent mapping; After performing Bernoulli displacement transformation on the Tent mapping, we get: x N+1 = (2x N ) mod 1 where N is the number of atoms, and the size of the initial population is determined by the number of atoms N and the search space dimension D.

4. An optimization method for BP neural network parameters based on an improved ASO algorithm according to claim 3, characterized in that: the specific method of Step 4.2 is: The amplitude function is introduced to correct the depth function η(t) and the Lagrange multiplier λ(t) in the ASO algorithm. The introduced amplitude function s(t) is defined as: s(t) = rand(|cos(d × t + N)|) where N is the number of atoms, t is the number of iterations, d is the dimension of the atomic search space, and rand is a random function, which means randomly selecting a number generated by the amplitude function as the fluctuation factor that finally acts on the parameters η(t) and λ(t); The amplitude function is corrected to obtain the corrected amplitude function as: s′(t) = rand(|cos(d × t + N)|) + 1 The depth function η(t) and the Lagrange multiplier λ(t) after the action of the amplitude function are redefined as: In the formula, s(t) is called the amplitude factor, α is the depth weight, β is the multiplier weight, and T is the maximum number of iterations; Furthermore, the acceleration of the i-th atom at the t-th iteration is redefined as: where is the position of the \(i\)-th atom at the \(t\)-th iteration in the \(d\)-th dimension, is the acceleration of the \(i\)-th atom at the \(t\)-th iteration in the \(d\)-th dimension, is the mass of the \(i\)-th atom at the \(t\)-th iteration in the \(d\)-th dimension; \(h\) ij (t) is the distance between two atoms, and \(rand\) j is a random number in \([0, 1]\), and \(Kbest\) is a subset of the entire set of atoms, consisting of the top \(k\) atoms with the best function fitness values.

5. A method for optimizing the parameters of a BP neural network based on an improved ASO algorithm according to claim 4, characterized in that: The atomic position update formula described in step 4.3 is: Among them, is the position of the $i$-th atom at the $t$-th iteration, is the position of the $i$-th atom at the $(t + 1)$-th iteration, is the velocity of the $i$-th atom at the $(t + 1)$-th iteration, $\omega(t)$ is the step evolution factor simulating the atom position update process, $t$ is the number of iterations, $d$ is the dimension of the atom search space, and $T$ is the maximum number of iterations.

Citation Information

Patent Citations

  • Pareto multi-objective reactive power optimization method for wind-solar new energy complementary power grid

    CN111509731A

  • Bluetooth positioning method and system based on RBF neural network

    CN113518311A