This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2023-216935, filed on Dec. 22, 2023, the entire contents of which are incorporated herein by reference.
The embodiment discussed herein is related to an arithmetic program, an arithmetic method, and an information processing device.
Techniques related to optimization problems have been disclosed.
Japanese National Publication of International Patent Application No. 2021-504836, Japanese Laid-open Patent Publication No. 2023-75612, Japanese Laid-open Patent Publication No. 2022-85164, U.S. Patent Publication No. 2020/0242504, and U.S. Patent Publication No. 2020/0090071 are disclosed as related arts.
According to an aspect of the embodiments, a non-transitory computer-readable recording medium storing an arithmetic program for causing a computer to repeatedly execute a process includes creating an Ising model based on a training data set that includes a plurality of pieces of training data in which an input variable and an evaluation value are associated with each other, searching for a value of a recommended input variable based on the Ising model, giving a variation to the searched value of the recommended input variable and calculating the evaluation value for the value of the recommended input variable after the variation is given, and adding the value of the recommended input variable and the calculated evaluation value to the training data set as new training data when the value of the recommended input variable does not exist in the training data included in the training data set, and updating a statistical value of the evaluation value of the training data and the evaluation value for the value of the recommended input variable after the variation is given as the evaluation value of the training data when the value of the recommended input variable exists in the training data included in the training data set.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention.
For example, it has been considered to achieve optimization by performing sampling using an Ising model in a QUBO format. However, it is difficult to obtain a robust solution.
In one aspect, an object of the present case is to provide an arithmetic program, an arithmetic method, and an information processing device capable of obtaining a robust solution.
A binary variable sampling technique is used as a technique for searching a large number of combinations, orders, and the like for a good solution having a high evaluation value. Examples of the binary variable sampling technique include a sampling technique for randomly performing sampling, a sampling technique using an Ising model in a QUBO format, and the like.
The sampling technique for randomly performing sampling allows sampling to be easily performed, but has a disadvantage that sampling efficiency is poor and that the number of times of sampling increases to obtain a good solution with high accuracy.
In view of the above, it is conceivable to utilize the sampling technique using an Ising model in the QUBO format.
Here, the QUBO format stands for quadratic unconstrained binary optimization, which is a format in which binary optimization is allowed without a secondary constraint. The QUBO format may be expressed as in the following formula, for example. Note that xi=0 or 1 (i=1, . . . , N) holds. A coupling coefficient of xi and xj is denoted by Wij. A bias coefficient of xi is denoted by bi. The first term on the right side is a quadratic term, which represents an interaction. The second term on the right side is a linear term, which represents a bias action. The third term on the right side is a constant term. In the QUBO format, as exemplified in
Optimization problems exist in various industries including a distribution industry and a manufacturing industry. For those problems, an optimization algorithm for obtaining an exact solution that achieves a highest effect in calculation has been studied.
Here, the exact solution indicates a solution having a highest evaluation index. For example, in a production line, the evaluation index includes a production completion time, a delivery time, a production cost, and the like. In boxing work, the evaluation index includes a waste material amount, a working time, and the like. The optimization algorithm is an algorithm that uses one or more evaluation indexes as an objective function and performs optimization such that the objective function becomes favorable. Note that, in the production line, input variables are conditions such as a working time needed for each product in addition to initial order of input of products into the production line. In the boxing work, input variables are conditions such as a size of each product, a weight of each product, a box size, and the like in addition to initial order of boxing of products. A solution to be obtained is order of input of the products into the production line, or the like. In the boxing work, a solution to be obtained is boxing order of the products, or the like.
According to the optimization algorithm, an exact solution having the highest evaluation index may be obtained. However, since various variations may occur in practice when an attempt is made to apply the exact solution obtained by those optimization algorithms, it is difficult to perform operation according to the exact solution, or it is conceivable that a physical property may not be obtained according to the exact solution and may be, as a result, slightly deviated from the exact solution.
Here, an exact solution obtained by an existing approach is often a solution that may locally obtain a high effect. Therefore, it is conceivable that, when work content and a physical property deviate from the exact solution (=tolerance occurs), an effect is drastically reduced, and an assumed effect may not be obtained. Furthermore, since a variation factor in a field is not considered even if the work content is in accordance with the exact solution, it is conceivable that the assumed effect may not be actually obtained.
For example, in the boxing work, phenomena are conceivable in which a time needed for work becomes longer due to a difference in a skill level of a worker, packing work according to the exact solution may not be performed due to a size error of a product handled in the work, and the like. Those phenomena may occur in an actual field. When those phenomena occur, the work content deviates from the exact solution.
For example, the optimal solution around x=0.1 has the smallest value of y, and thus it is an exact solution. Although the value of y is the smallest in this exact solution, the solution exists locally, and accordingly, the value of y is largely increased by the value of x only slightly deviating from the exact solution. This is because, in the graph of
However, an optimization problem has a problem that the problem is complex, difficult to formulate as an objective function, and has a high calculation cost. In view of the above, it is conceivable to use a black-box optimization method for searching for an optimum input by repeating a process of setting an input to be a new search point based on the input and output data of the optimization problem, obtaining an output thereof, and newly conducting a search based on a result thereof. As one of such optimization methods, it is conceivable to use an FM (machine learning approach) model with low calculation cost.
For example, a factorization machine with quantum annealing (FMQA) and the like are exemplified. The FMQA is an approach obtained by combining quantum annealing (QA) and an FM. The FMQA is an approach for performing interactive sampling in which an FM model in the QUBO format is created from training data, a good solution is obtained by the QA, an evaluation value of the good solution is analyzed by a characteristic solver, and a result is added to the training data. Besides, examples of the sampling technique using a model in the QUBO format include a technique of a factorization machine with a digital annealer (FMDA), and the like. The FMDA is obtained by replacing the QA part of the FMQA with a digital annealer (DA).
Here, an outline of the FMQA will be described.
Next, the input variables are converted into a bit array for each piece of the training data included in the training data set. For example, decimal values obtained by multiplying the input variables of 0 to 1.27 by 100 are converted into 7-bit binary numbers. As a result, the input variables may be converted into a vector format in which x=(x1, x2, . . . , xM) and each value is a binary value of 0 or 1.
Next, an FM model is created using the training data set and is subject to the QUBO, thereby creating an Ising model in the QUBO format. Since the FM is in the QUBO format, creating an FM is equivalent to creating an Ising model in the QUBO format. As long as an Ising model in the QUBO format may be created, any other machine learning models may also be used.
Next, the created Ising model in the QUBO format is optimized using the QA, and a good solution (recommended bit array) with the best evaluation value is generated.
Next, the recommended bit array is returned to a numerical value in the range of x=0 to 1.27, thereby calculating a recommended input variable.
Next, the recommended input variable is analyzed by the characteristic solver to calculate an evaluation value.
Next, an evaluation result (set of the recommended input variable and the evaluation value) is newly added to the training data set as training data. By those series of processes being repeated, the training data set is updated, and an optimal solution may be obtained.
Note that, in
Such a sampling technique is an approach for obtaining an exact solution having a minimum evaluation value. Thus, a robust solution in consideration of variation is not necessarily obtained.
In view of the above, it is conceivable to use a multi-objective robust design optimization (MORDO) method as a robust optimization method. According to this method, an approach is taken in which a design variable to be searched is varied by repetitive sampling during an optimization operation and an obtained index is statistically processed and evaluated. An average value and a standard deviation value of the objective function are used as evaluation values, and a solution with a higher evaluation value is finally calculated as an optimal solution. According to the MORDO method, a sufficient number of sampling points are repeatedly evaluated in the vicinity of an input variable, whereby a highly robust solution may be obtained. However, in a case of using a characteristic solver with a higher calculation cost, the calculation cost increases, and is not realistic.
In view of the above, an exemplary case where a robust solution may be obtained while suppressing a calculation cost will be described in the following embodiment.
First, the principle of the present embodiment will be described.
For example,
Accordingly, as exemplified in
When the process of
For example, in a case where the exact solution described with reference to
Hereinafter, a device configuration for achieving the principle described above will be described.
The central processing unit (CPU) 101 is a central processing device. The CPU 101 includes one or more cores. The random access memory (RAM) 102 is a volatile memory that temporarily stores a program to be executed by the CPU 101, data to be processed by the CPU 101, and the like. The storage device 103 is a nonvolatile storage device. As the storage device 103, for example, a read only memory (ROM), a solid state drive (SSD) such as a flash memory, a hard disk to be driven by a hard disk drive, or the like may be used. The storage device 103 stores an arithmetic program. The input device 104 is an input device such as a keyboard, a mouse, or the like. The display device 105 is a display device such as a liquid crystal display (LCD). The storage unit 10, the initial point generation unit 20, the evaluation unit 30, the FMQA execution unit 40, the training data update unit 50, the output unit 60, and the like are implemented by the CPU 101 executing the arithmetic program. Note that hardware such as a dedicated circuit may be used as the storage unit 10, the initial point generation unit 20, the evaluation unit 30, the FMQA execution unit 40, the training data update unit 50, the output unit 60, and the like.
Next, the evaluation unit 30 calculates an average value of evaluation values for each input variable (step S2). If step S2 is executed for the first time, a plurality of evaluation values has not yet been obtained for the input variable, and thus each evaluation value is treated as an average value.
Next, the training data update unit 50 associates the bit array and the average value of the evaluation values with the input variable for which the average value of the evaluation values has been calculated, and sets them as training data (step S3). If step S3 is executed for the first time, the original data of step S1 is treated as the training data.
Next, the FMQA execution unit 40 creates an FM model using the training data obtained in step S3 (step S4). Note that, since the FM is in the QUBO format, creating an FM is equivalent to creating an Ising model in the QUBO format. As long as an Ising model in the QUBO format may be created, any other machine learning models may also be used.
Next, the FMQA execution unit 40 generates recommended points (recommended bit array) corresponding to a set number of recommendations using the FM created in step S4 (step S5). The set number of recommendations is preset by a user. The recommended point is one good solution (recommended point) giving the best evaluation value. Alternatively, the recommended point is one or more good solutions (recommended points) having an evaluation value equal to or higher than a threshold. Alternatively, the recommended points are a plurality of good solutions (recommended points) having top evaluation values up to a predetermined place.
Next, the FMQA execution unit 40 converts the recommended bit array generated in step S5 into a recommended input variable (step S6).
Next, the FMQA execution unit 40 determines whether or not a convergence condition is satisfied (step S7). For example, the FMQA execution unit 40 determines whether or not the number of iterations has reached the upper limit. It is sufficient if the number of times of execution of step S7 is treated as the number of iterations. The upper limit number of the number of iterations is preset by the user. If it is determined as “Yes” in step S7, the execution of the flowchart is terminated.
If it is determined as “No” in step S7, the FMQA execution unit 40 gives a variation to the recommended input variable (step S8).
Next, the evaluation unit 30 calculates, using a solver, an evaluation value for the recommended input variable to which the variation has been given (step S9).
Next, the training data update unit 50 adds, as training data, the recommended input variable before the variation is given and the evaluation value calculated in step S9 to the training data set (step S10). Thereafter, step S2 and the subsequent steps are executed again.
The output unit 60 outputs a result of the process of
According to the present embodiment, the searched recommended input variable is varied, and an evaluation value is calculated for the varied recommended input variable. When there is no recommended input variable in the training data included in the training data set, the recommended input variable and the calculated evaluation value are added to the training data set as new training data. When there is a recommended input variable in the training data included in the training data set, a statistical value of the evaluation value of the training data and the evaluation value for the varied recommended input variable is updated as the evaluation value of the training data. By updating the training data set in this manner, a robust solution may be obtained. While one variation value=α is given to the recommended input variable in the example described above, it may two or more. For example, a variation value=α1 and a variation value=α2 may be given to the recommended input variable x1. Since evaluation values f(x1), f(x1+α1), and f(x1+α2) are obtained for the recommended input variable x1 in this case, it is sufficient if a statistical value, such as an average value of those evaluation values, is calculated. However, since a calculation cost of the characteristic solver is high, it is preferable to give one variation value to the recommended input variable.
Furthermore, when the variation value is too large, the evaluation value for the robust solution may be degraded. In view of the above, an upper limit may be set for the variation value. For example, the upper limit of the variation value may be set to a fixed value. For example, since a user is enabled to change the upper limit of the variation value, an upper limit value suitable for an optimization problem may be set. On the other hand, when the variation value is too small, the probability that the exact solution is searched for as an optimal solution may increase. In view of the above, a lower limit may be set for the variation value. For example, the lower limit of the variation value may be set to a fixed value. For example, since the user is enabled to change the lower limit of the variation value, a lower limit value suitable for the optimization problem may be set.
Hereinafter, a simulation result of setting a virtual problem and performing the arithmetic process according to the above-described embodiment will be described. Specifically, a maximization problem of a formula fb(x), which is a standard problem of the following formula (2), is treated as a minimization problem, and the minimization problem of the following formula (3) is solved. Note that the following formula (3) is expressed by
Decimal values obtained by multiplying individual values of x=0 to 1.27 by 100 were converted into 7-bit binary numbers. An FM model of the following formula (4) was used. In the FM model, k=3, and the initial training data was 10 pieces of random data. An iteration count (number of iterations) was set to 300. A single-objective genetic algorithm (GA) was used for an optimization engine. The number of evolution generations in the GA was set to 50 generations. The number of individuals was set to 10 individuals. The initial value was set to 10 pieces of random data same as the initial training data of the FM model. When the recommended input variable was varied, white noise of [−0.05, 0.05] was set as a random number at the time of input to the characteristic solver.
In respective upper, middle, and lower graphs in
As illustrated in the middle graph in
In the example described above, the FMQA execution unit 40 corresponds to an execution unit that repeatedly executes a process of creating an Ising model based on a training data set including a plurality of pieces of training data in which an input variable and an evaluation value are associated with each other, a process of searching for a recommended input variable for the Ising model, and a process of adding the recommended input variable and an evaluation value calculated by giving a variation to the recommended input variable to the training data set as new training data when the recommended input variable does not exist in the training data included in the training data set and updating a statistical value of the evaluation value of the training data and the evaluation value calculated for the recommended input variable after the variation is given as the evaluation value of the training data when the recommended input variable exists in the training data included in the training data set.
While the embodiment has been described above in detail, the embodiment is not limited to such a particular embodiment, and various modifications and alterations may be made within the scope of the gist of the embodiment described in the claims.
All examples and conditional language provided herein are intended for the pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although one or more embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2023-216935 | Dec 2023 | JP | national |