Optimization device, optimization method, and optimization program
Patent Information
- Application Number
- JP2023126778
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-08-03
- Publication Date
- 2025-02-14
AI Technical Summary
【0011】 本開示によれば、アニーリングを用いた最適化において段階的な最適解を得ることができる。
Smart Images

Figure 2025022329000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an optimization device, an optimization method, and an optimization program for solving combinatorial optimization problems by annealing. [Background technology]
[0002] It is common to use quantum annealing to find the optimal value of an objective function in a combinatorial optimization problem. For example, Patent Document 1 describes an information processing device that builds a regression model. In the information processing device described in Patent Document 1, an optimal solution calculation unit finds an optimal solution from the regression model using quantum annealing.
[0003] Non-Patent Document 1 describes a method of using quantum annealing for a black-box optimization problem as a method for determining the arrangement of materials that will give the desired radiation intensity of a radiative cooling material. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2022-003484 A [Non-patent literature]
[0005] [Non-Patent Document 1] Koki Kitai, et. al., "Designing metamaterials with quantum annealing and factorization machines", PHYSICAL REVIEW RESEARCH 2, 013319 (2020) Summary of the Invention [Problem to be solved by the invention]
[0006] On the other hand, depending on the application, there may be cases where not only an optimal solution that obtains the optimal value of the objective function but also a stepwise optimal solution such as a second optimal solution and a further second optimal solution is required. However, it is generally difficult to obtain such stepwise optimal solutions.
[0007] Therefore, an object of the present disclosure is to provide an optimization device, an optimization method, and an optimization program that are capable of obtaining step-by-step optimal solutions in optimization using annealing. [Means for solving the problem]
[0008] The optimization device according to the present disclosure is an optimization device that solves a combinatorial optimization problem by annealing, and is equipped with an annealing means that executes a solution by annealing multiple times, and is characterized in that in the nth solution, the annealing means executes the solution such that a spin pair whose distance from the spin pair showing the optimal solution obtained in the first n-1 solution attempts is within a predetermined range is excluded from the search range. Another optimization device according to the present disclosure is an optimization device that solves a combinatorial optimization problem by annealing, and includes annealing means that executes a solution by annealing multiple times, and learning means that learns an objective function model expressed as a polynomial of spins by machine learning using learning data in which a pair of spins is an explanatory variable and a value obtained by applying the pair of spins to a black-box function representing a black-box optimization problem is an objective variable, the annealing means executes a solution by annealing using a Hamiltonian including the objective function model, and performs optimization calculations multiple times in which learning of the objective function model and solution by annealing are repeated, and the annealing means executes a solution by annealing so that, in the nth optimization calculation, spin pairs whose distance from the spin pair showing the best solution obtained in the n-1th optimization calculation is within a predetermined range are excluded from the search range.
[0009] The optimization method according to the present disclosure is an optimization method for solving a combinatorial optimization problem by annealing, characterized in that solution finding by annealing is performed multiple times, and in the n-th solution finding, a spin pair whose distance from the spin pair showing the optimal solution obtained in the solution finding up to the n-1th solution finding is within a predetermined range is excluded from the search range. Another optimization method according to the present disclosure is an optimization method for solving a combinatorial optimization problem by annealing, characterized in that an objective function model expressed by a spin polynomial is learned by machine learning using learning data in which a spin pair is an explanatory variable and a value obtained by applying the spin pair to a black-box function representing a black-box optimization problem is used as an objective variable, and a solution finding by annealing is performed using an objective function including the objective function model, and optimization calculations are performed multiple times in which the learning of the objective function model and the solution finding by annealing are repeated, and a solution finding by annealing is performed in such a way that a spin pair whose distance from the spin pair showing the best solution obtained in the optimization calculation up to the n-1th optimization calculation is within a predetermined range is excluded from the search range in the n-th optimization calculation.
[0010] The optimization program according to the present disclosure is an optimization program applied to a computer that solves combinatorial optimization problems by annealing, characterized in that the program makes the computer execute an annealing process that executes a solution by annealing multiple times, and in the annealing process, makes the computer execute the solution such that, in the nth solution, a spin pair whose distance from the spin pair showing the optimal solution obtained in the solution solving up to the (n-1)th solution solving is within a predetermined range is excluded from the search range. Another optimization program according to the present disclosure is an optimization program applied to a computer that solves combinatorial optimization problems by annealing, characterized in that the computer is caused to perform an annealing process that executes a solution by annealing multiple times, and a learning process that learns an objective function model expressed as a polynomial of spins by machine learning using learning data in which a pair of spins is an explanatory variable and a value obtained by applying the pair of spins to a black-box function representing a black-box optimization problem is an objective variable, the annealing process executes a solution by annealing using an objective function including the objective function model, and performs optimization calculations multiple times in which learning of the objective function model and solution by annealing are repeated, and the annealing process executes a solution by annealing so that in the nth optimization calculation, a spin pair whose distance from the spin pair showing the best solution obtained in the n-1th optimization calculation is within a predetermined range is excluded from the search range. Effect of the Invention
[0011] According to the present disclosure, it is possible to obtain stepwise optimal solutions in optimization using annealing. [Brief description of the drawings]
[0012] [Figure 1] 1 is a block diagram showing a configuration example of a first embodiment of an optimization device according to the present disclosure. FIG. [Diagram 2] FIG. 11 is an explanatory diagram illustrating an example of an optimization process. [Diagram 3] 1 is a flowchart illustrating an example of the operation of the optimization device according to the present disclosure. [Figure 4]13 is a flowchart showing an example of an operation for finding a first solution by annealing. [Diagram 5] 13 is a flowchart showing an example of an operation for finding an n-th solution by annealing. [Figure 6] 13 is a flowchart showing another example of an operation for finding an n-th solution by annealing. [Figure 7] FIG. 11 is a block diagram showing a configuration example of a second embodiment of an optimization device according to the present disclosure. [Figure 8] FIG. 11 is an explanatory diagram showing an example of optimization calculation. [Figure 9] FIG. 11 is an explanatory diagram showing an example of a graph showing the convergence status of an objective function. [Figure 10] 1 is a flowchart illustrating an example of the operation of the optimization device according to the present disclosure. [Figure 11] 13 is a flowchart showing an example of an operation of a first optimization calculation. [Figure 12] 13 is a flowchart showing an example of the operation of the n-th optimization calculation. [Figure 13] 13 is a flowchart showing another operation example of the n-th optimization calculation. [Figure 14] FIG. 1 is a block diagram showing an overview of an optimization device according to the present disclosure. [Figure 15] FIG. 13 is a block diagram showing another overview of the optimization device according to the present disclosure. [Figure 16] FIG. 1 is a schematic block diagram illustrating a configuration of a computer according to at least one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
[0014] Embodiment 1. 1 is a block diagram showing an example of the configuration of a first embodiment of an optimization device according to the present disclosure. The optimization device 100 of this embodiment includes an objective function creation unit 10, a constraint equation creation unit 20, an annealing unit 30, a solution result storage unit 40, and a solution result display unit 50.
[0015] The objective function creation unit 10 creates an objective function for a combinatorial optimization problem. The contents of the combinatorial optimization problem are arbitrary, and the method of creating the objective function is also arbitrary. The objective function creation unit 10 may create an objective function expressed by a general mathematical formula, or may create an objective function in a format (e.g., a spin polynomial) used when the annealing unit 30 described later performs optimization. The objective function creation unit 10 may also receive an input of an objective function created by a user or the like.
[0016] The constraint equation creating unit 20 creates constraint equations that represent constraint conditions imposed on a combinatorial optimization problem. The contents of the constraint conditions are arbitrary, and the method of creating the constraint equations is also arbitrary. The constraint equation creating unit 20 may create constraint equations expressed in general mathematical expressions, or may create constraint equations in a format (e.g., spin polynomials) used when the annealing unit 30 described later performs optimization. The constraint equation creating unit 20 may also receive an input of an objective function created by a user or the like.
[0017] The constraint equation creating unit 20 may create new constraint equations in response to an instruction from the annealing unit 30 described later. The content of the new constraint equation to be created will be described later. The processes of the objective function creating unit 10 and the constraint equation creating unit 20 may be executed by the annealing unit 30.
[0018] The annealing unit 30 executes a solution by annealing. The annealing unit 30 of this embodiment executes a solution by annealing multiple times. In the example shown in FIG. 1, a configuration in which the annealing unit 30 is realized integrally with the optimization device 100 is illustrated, but the annealing unit 30 may cause a quantum annealing machine (not shown) realized in a device different from the optimization device 100 to execute a solution by annealing. That is, the annealing unit 30 may perform an optimization process by annealing by itself, or may cause a quantum annealing machine (not shown) to execute the optimization process.
[0019] The quantum annealing machine described above is, for example, a device that solves a target optimization problem by an annealing method. The quantum annealing machine is a dedicated device for finding the ground state of the Hamiltonian of an Ising model, and is realized as a device that executes annealing in response to an instruction from the annealing unit 30. More specifically, the quantum annealing machine is a device that probabilistically finds the value of a binary variable that minimizes or maximizes the Hamiltonian of an Ising model that has a binary variable as an argument.
[0020] The binary variables may be realized by classical bits or quantum bits. The annealing unit 30 and the quantum annealing machine of this embodiment may be in any form. The annealing unit 30 and the quantum annealing machine may be configured by any hardware that probabilistically determines the value of a binary variable that minimizes or maximizes a Hamiltonian with a binary variable as an argument. The annealing unit 30 and the quantum annealing machine may be, for example, a non-von Neumann type computer in which the Hamiltonian is implemented by hardware in the form of an Ising model, or may be a device using pseudo-quantum annealing technology or quantum inspired technology.
[0021] In the following description, it is stated that the annealing unit 30 performs the solution-finding by annealing both when the annealing unit 30 itself performs the optimization process by annealing and when the annealing unit 30 has a quantum annealing machine (not shown) perform the optimization process.
[0022] Furthermore, the annealing unit 30 of this embodiment performs a second-best solution search so as to exclude optimal solutions already obtained in past solution searches. In the following description, the solution obtained as a result of this second-best solution search will also be referred to as the optimal solution. Specifically, in the nth (n≧2) solution search, the annealing unit 30 performs the solution search so as to exclude from the search range spin pairs whose distances to the spin pairs indicating the optimal solutions obtained in the n-1st solution searches are within a predetermined range. The spin distance used for the judgment is determined in advance by the user, etc.
[0023] The annealing unit 30 may use the Hamming distance of the spin pair as the distance of the spin pair. Alternatively, the annealing unit 30 may use the distance of the set of decision variables represented by the spins (for example, the Euclidean distance) as the distance of the spin pair.
[0024] Below, we will explain a specific example of expressing a decision variable with a spin. For example, a decision variable u that can take values from 0 to 127 is expressed as 2 i If the digit of s is expressed as a spin, the set of spins s=[s0,s1,s2,s3,s4,s5,s6],s i Using ∈{0,1}, this can be expressed as in Equation 1 below.
[0025]
number
[0026] In addition, the above decision variable u can also be expressed as shown in the following example Equation 2 using a one-hot condition.
[0027]
number
[0028] However, in the representation shown in Equation 2, the set of spins required is s = [s0, s1, s2, …, s 127 ], and in order to express the one-hot condition, it is necessary to add the constraint equation shown in the following equation 3 to the Hamiltonian.
[0029]
number
[0030] In the following description, for the sake of simplicity, a case where the Hamming distance between a pair of spins is used as the distance is illustrated, but the same applies when the distance between a pair of decision variables (such as the Euclidean distance) is used.
[0031] The predetermined range used for the judgment is also determined in advance by a user, etc. For example, when excluding optimal solutions with up to two different values from among the sets of spins, the Hamming distance d may be set to 2.
[0032] Hereinafter, specific methods for solving the problem so as to exclude the problem from the search range will be described. The first method is to add a constraint equation that imposes a (positive) penalty when a solution is selected whose distance from a set of spins indicating an optimal solution already obtained in a past solution is within a predetermined range.
[0033] FIG. 2 is an explanatory diagram showing an example of the optimization process. Here, the objective function creation unit 10 calculates the objective function H O (s), and the constraint equation generator 20 generates the constraint equation H C As a result of generating (s), the Hamiltonian H = H O (s)+H C (s) is assumed to have been generated.
[0034] The annealing unit 30 executes a first solution by annealing (step S1). The first solution is a set of spins s1(s1^)=[s 1,1 ^,s 1,2 ^,s 1,3 ^,…,s 1,Ns ^] is obtained.
[0035] Next, the annealing unit 30 calculates a constraint equation H C The second solution is performed using the Hamiltonian with the addition of ´(s) (step S2). C '(s) is expressed, for example, by the following equation 4.
[0036]
number
[0037] The first term in the brackets in Equation 4 indicates the Hamming distance between s1^ and s. It takes the value 0 when s1^=s, and takes the value 1 to N when s1^≠s. s The second term in the brackets in Equation 4 takes the value of d or more. s are slack variables containing the following integers, represented here using binary notation:
[0038] Hamiltonian H = H O (s)+H C (s)+H C Because a penalty is imposed when a combination of spins within a certain distance from s1^ (shaded area M1 in Figure 2) is selected by ´(s), it is excluded from the search range in the optimization. As a result, the second solution finds a set of different spins s2^=[s 2,1 ^,s 2,2 ^,s 2,3 ^,…,s 2,Ns ^] is obtained.
[0039] In the subsequent processing, the annealing unit 30 performs the annealing process on the constraint equation H C The nth solution is performed using the Hamiltonian with the addition of ´(s) (step S3). C '(s) is expressed, for example, by the following equation 5.
[0040]
number
[0041] The content of the constraint equation shown in Equation 5 is the same as that shown in Equation 4, and imposes a penalty when a combination of spins obtained in the n-1th processing is selected. As a result, the nth solving step selects a set of different spins s that minimizes the objective function (Hamiltonian H). n ^=[sn,1 ^,s n,2 ^,s n,3 ^,…,s n,Ns ^] is obtained.
[0042] The annealing unit 30 calculates the constraint H C The user may create '(s) himself, or may instruct the constraint equation creating unit 20 to create a constraint equation.
[0043] Next, a second method of solving the problem by excluding solutions from the search range will be described. The second method is a method of performing annealing in which solutions whose distance from a set of spins showing an optimal solution already obtained in a past solution is within a predetermined range are excluded from the search range.
[0044] The annealing unit 30 may perform annealing by excluding optimal solutions obtained in the past from the search range in any method. For example, as a method similar to the first method, the annealing unit 30 may perform the n-th solution using a Hamiltonian to which a constraint equation indicating a one-hot condition is added in order to exclude a set of spins indicating optimal solutions already obtained in the past up to n-1 solution attempts.
[0045] The method of executing the second method is not limited to adding a constraint equation. The annealing unit 30 may execute the solution by instructing an optimization process to a quantum annealing machine capable of performing annealing with the previously obtained optimal solution excluded from the search range. The annealing unit 30 may also execute the solution by using software (annealing software) capable of instructing a quantum annealing machine to exclude the previously obtained optimal solution from the search range.
[0046] In the second method, the optimization process can be performed in the same manner as in the method illustrated in FIG.
[0047] The solution-finding result storage unit 40 stores optimal solutions obtained by multiple solution-finding operations. The solution-finding result storage unit 40 may store the optimal solutions together with information that can identify the order in which the optimal solutions were obtained. The solution-finding result storage unit 40 is realized by, for example, a magnetic disk or the like.
[0048] The solution-finding result display unit 50 outputs the obtained optimal solution. The method by which the solution-finding result display unit 50 outputs the optimal solution is arbitrary. For example, the solution-finding result display unit 50 may output optimal solutions obtained by multiple solution-findings in the order in which the optimal solutions were obtained. In this embodiment, the earlier an optimal solution obtained by the annealing unit 30 is obtained, the more preferable the solution is considered to be. Therefore, by having the solution-finding result display unit 50 output the optimal solutions in the order in which they were obtained, it becomes possible to output the optimal solutions in order starting from the most preferable.
[0049] The objective function creation unit 10, the constraint equation creation unit 20, the annealing unit 30, and the solution result display unit 50 are realized by a computer processor (e.g., a CPU (Central Processing Unit), a GPU (Graphics Processing Unit)) that operates according to a program (optimization program). As described above, the annealing unit 30 may be realized by a quantum annealing machine.
[0050] For example, the program may be stored in a storage unit (not shown) of the optimization device 100, and the processor may read the program and operate as the objective function creation unit 10, the constraint equation creation unit 20, the annealing unit 30, and the solution result display unit 50 in accordance with the program. Furthermore, the functions of the optimization device 100 may be provided in a SaaS (Software as a Service) format.
[0051] Also, the objective function creation unit 10, the constraint equation creation unit 20, the annealing unit 30, and the solution result display unit 50 may each be realized by dedicated hardware. Also, some or all of the components of each device may be realized by general-purpose or dedicated circuits, processors, etc., or a combination of these. These may be configured by a single chip, or may be configured by multiple chips connected via a bus. Some or all of the components of each device may be realized by a combination of the above-mentioned circuits, etc., and programs.
[0052] Furthermore, when some or all of the components of the optimization device 100 are realized by a plurality of information processing devices, circuits, etc., the plurality of information processing devices, circuits, etc. may be centrally arranged or distributed. For example, the information processing devices, circuits, etc. may be realized as a client-server system, a cloud computing system, etc., in a form in which each is connected via a communication network.
[0053] Next, the operation of the optimization device 100 of this embodiment will be described. FIG. 3 is a flowchart showing an example of the operation of the optimization device 100 according to the present disclosure. The objective function creation unit 10 creates an objective function represented by a polynomial of the spin of the combinatorial optimization problem to be solved (step S101). The constraint equation creation unit 20 creates a constraint equation represented by a polynomial of the spin of the combinatorial optimization problem to be solved (step S102). The annealing unit 30 executes a solution by annealing multiple times (step S103). Then, the solution result display unit 50 displays all the obtained optimal solutions (step S104).
[0054] Next, a solution-finding operation by annealing executed multiple times (the process of step S103 exemplified in FIG. 3) will be described. FIG. 4 is a flowchart showing an example of the first solution-finding operation by annealing.
[0055] The annealing unit 30 creates a Hamiltonian by combining the objective function of the combinatorial optimization problem to be solved, created in step S101, and the constraint equations of the combinatorial optimization problem to be solved, created in step S102, and uses annealing to find the spin value that minimizes this (step S111).
[0056] 5 is a flowchart showing an example of an operation for solving the n-th problem by annealing. The flowchart shown in FIG. 5 shows an example of an operation for solving the problem by the first method described above.
[0057] The constraint equation creation unit 20 creates a constraint equation, expressed as a polynomial of spins, that prevents the selection of a pair of spins whose distance from each pair of spins showing the optimal solution obtained in the first (n-1) solution attempts is within a predetermined range (step S211).
[0058] The annealing unit 30 creates a Hamiltonian by combining the objective function of the optimization problem to be solved created in step S101, the constraint equation of the optimization problem to be solved created in step S102, and the constraint equation created in step S211, and uses annealing to find the set of spins that minimizes this (step S212).
[0059] The annealing unit 30 judges whether the number of times n of solution solving has reached a predetermined number (step S213). If the predetermined number has not been reached (no in step S213), the annealing unit 30 ends the nth solution solving and executes the n+1th solution solving (step S214). On the other hand, if the predetermined number has been reached (yes in step S213), the solution solving result display unit 50 displays all solution solving results (step S215).
[0060] Fig. 6 is a flowchart showing another operation example of the n-th solution finding by annealing. The flowchart shown in Fig. 6 shows an operation example of the method of performing solution finding by the second method described above.
[0061] The annealing unit 30 creates a Hamiltonian by combining the objective function of the optimization problem to be solved created in step S101 and the objective function and constraint equation of the optimization problem to be solved created in step S102. Then, the annealing unit 30 executes annealing in which spin pairs whose distances from each of the spin pairs showing the optimal solutions obtained in the n-1th solving are within a predetermined range are excluded from the search range, and finds the spin pair for which the Hamiltonian is minimum (step S221).
[0062] Thereafter, the process from determining whether or not to end the solution finding to displaying the solution finding results is similar to the process from step S213 to step S215 illustrated in FIG.
[0063] As described above, in this embodiment, the annealing unit 30 executes the solution search in such a way that in the nth (n≧2) solution search, the spin pairs whose distance from the spin pair showing the optimal solution obtained in the n-1th solution search is within a predetermined range are excluded from the search range. Therefore, it is possible to obtain the optimal solution step by step in the optimization using annealing.
[0064] Quantum annealing is generally used to find the optimal value of an objective function in combinatorial optimization problems. However, depending on the application, ranked solutions such as the second optimal value, the third optimal value, etc., may be required in addition to the optimal value of the objective function.
[0065] For example, when used in material development where various possibilities are considered, development can be carried out while referring not only to the raw material mixture amounts corresponding to the optimal property values, but also to the raw material mixture amounts corresponding to the next best property values. This analytical method of finding the raw material mixture amounts by optimizing the property values of interest is called mixture amount inverse analysis. This type of mixture amount inverse analysis is an example where the above-mentioned ranked solutions are required.
[0066] However, it is generally difficult to systematically obtain ranked solutions using quantum annealing. On the other hand, in this embodiment, the annealing unit 30 executes the solution in the n-th solution so as to avoid the optimal solution obtained in the n-1th solution. Therefore, it is possible to systematically obtain ranked solutions because the second best solution is obtained so as to avoid the optimal solution already obtained.
[0067] Embodiment 2. Next, a second embodiment of the optimization device of the present disclosure will be described. The optimization device of the second embodiment is assumed to solve a black-box optimization problem using annealing. A black-box optimization problem is an optimization problem in which a specific expression of an objective function to be optimized (hereinafter, also referred to as a black-box function) is not explicitly given. In this embodiment, it is assumed that this black-box optimization problem includes elements of a combinatorial optimization problem.
[0068] For example, in the method described in Non-Patent Document 1, an optimization calculation is performed by using machine learning to find a relational expression (objective function model) between multiple 0 / 1 binary variables (spins) that represent the arrangement of materials and radiation intensity, and repeating the procedure of finding the spin that maximizes the radiation intensity using quantum annealing. However, due to bias in the learning data used in this machine learning, it is expected that the solution of the optimization calculation will fall into a local optimum solution, and the arrangement of materials that gives the desired radiation intensity cannot be obtained.
[0069] To address this issue, it is considered preferable to prepare multiple sets of learning data and perform the above optimization calculation for each set. Therefore, in this embodiment, optimization calculations are performed multiple times to create an objective function model by machine learning and to repeatedly find a solution by annealing. In this case, in the nth optimization calculation, annealing is performed to avoid solutions within a predetermined range from the optimal solution in the optimization calculations up to the n-1th optimization calculation. This reduces the possibility that a desired solution cannot be obtained due to bias in the learning data, etc.
[0070] 7 is a block diagram showing a configuration example of a second embodiment of an optimization device according to the present disclosure. The optimization device 200 of this embodiment includes an initial learning data creation unit 110, a learning data storage unit 120, an objective function model creation unit 130, a constraint equation creation unit 20, an annealing unit 30, an annealing result determination unit 140, an optimization calculation result display unit 150, and an optimization calculation result storage unit 160.
[0071] That is, the optimization device 200 of this embodiment differs from the optimization device 100 of the first embodiment in that, instead of the objective function creation unit 10, the solution result storage unit 40, and the solution result display unit 50, the optimization device 200 of this embodiment includes an objective function model creation unit 130, an optimization calculation result display unit 150, and an optimization calculation result storage unit 160, and further includes an initial learning data creation unit 110, a learning data storage unit 120, and an annealing result determination unit 140. The other configurations are the same as those of the first embodiment.
[0072] The initial learning data creation unit 110 creates initial learning data that is used by the objective function model creation unit 130, which will be described later, to learn an objective function model that expresses the black-box function of the black-box optimization problem as a spin polynomial. O That is, the Hamiltonian on which the annealing unit 30 performs annealing is expressed as the sum of the objective function model and the constraint equations created by the constraint equation creating unit 20.
[0073] The initial training data creation unit 110 may create the initial training data in any manner. For example, the initial training data creation unit 110 may generate training data in response to an instruction from a user or the like, or may instruct a simulator, which is a black-box function of a target black-box optimization problem, to generate training data.
[0074] The learning data storage unit 120 stores learning data used for learning by the objective function model creation unit 130 described later. The learning data storage unit 120 may store learning data created by the initial learning data creation unit 110, or may store learning data created by a user or another system, etc. The learning data storage unit 120 is realized by, for example, a magnetic disk, etc.
[0075] The objective function model creation unit 130 creates an objective function model that expresses the black-box function of the black-box optimization problem as a polynomial of spin. Specifically, the objective function model creation unit 130 performs a process of learning the objective function model expressed as a polynomial of spin by machine learning using the learning data described above. The objective function model is expressed, for example, as in the following formula 6, and a parameter Q ij , b is derived. In Equation 6, H O (s) is the objective function model, and s i ,s j are the spins, respectively.
[0076]
number
[0077] The annealing method by the annealing unit 30 is the same as in the first embodiment.
[0078] The annealing result determination unit 140 determines whether or not to continue the optimization process. For example, when the value of the Hamiltonian is smaller than a predetermined value, the annealing result determination unit 140 may determine that a sufficient solution has been obtained and determine to end the process. Note that the criteria for determining whether or not to continue are determined by, for example, a user.
[0079] Furthermore, the annealing result determination unit 140 applies the optimal solution obtained by the annealing in the annealing unit 30 to the black-box function of the black-box optimization problem to create new learning data.
[0080] The optimization calculation result display unit 150 displays the result of the optimization calculation. The optimization calculation result display unit 150 may display, for example, a learned objective function model. In addition, the optimization calculation result display unit 150 may display a graph showing the convergence status of the objective function. The graph showing the convergence status of the objective function will be described later.
[0081] The optimization calculation result storage unit 160 stores the results of the optimization calculation. The optimization calculation result storage unit 160 is realized by, for example, a magnetic disk.
[0082] Hereinafter, the optimization calculation performed by the initial learning data creation unit 110, the objective function model creation unit 130, the annealing result determination unit 140, and the annealing unit 30 will be specifically described using the learning data storage unit 120. Fig. 8 is an explanatory diagram showing an example of the optimization calculation.
[0083] The example shown in FIG. 8 illustrates a case where the annealing unit 30 uses the first method in the first embodiment (i.e., a method of adding a constraint equation that imposes a (positive) penalty when a solution is selected whose distance from a set of spins indicating an optimal solution already obtained in a past solution search is within a specified range).
[0084] First, the initial learning data creation unit 110 creates a set of initial learning data and stores it in the learning data storage unit 120. The objective function model creation unit 130 uses this set of learning data to learn an objective function model. The objective function model creation unit 130 learns an objective function model using a set of learning data stored in the learning data storage unit 120, in which, for example, a set of spins is used as an explanatory variable, and a value obtained by applying the set of spins to a black-box function representing a black-box optimization problem is used as an objective variable (step S21).
[0085] The annealing unit 30 generates a Hamiltonian to be used in annealing from the obtained objective function model and constraint equation. The Hamiltonian H is, for example, as shown in FIG. O (s) and the constraint H CThen, the annealing unit 30 executes a first solution by annealing (step S22). The first solution is a set of spins s1 superscript bar (hereinafter, superscript bar is referred to as ― Expressed as:s ― )=[s1 ― ,s2 ― ,s3 ― ,…,s Ns ― ] is obtained.
[0086] The annealing result determination unit 140 determines whether or not to continue the optimization cycle (step S23). ― It may be possible to determine whether to continue the optimization cycle based on whether a value obtained by applying the black-box function representing the black-box optimization problem is a desired solution. If it is determined that the optimization cycle should be continued, the annealing result determination unit 140 creates new learning data and adds it to the set of learning data (step S24). The annealing result determination unit 140, for example, applies a set of spins s1, which are explanatory variables, to a simulator, which is a function (black-box function) representing the target black-box optimization problem. ― and creating training data using the obtained value as the objective function.
[0087] The optimization cycle from step S21 to step S24 is repeated a predetermined number of times to complete the first optimization calculation. The set of spins that is the best solution obtained in the first optimization calculation is denoted by s1 (hereinafter, the superscript tilde is referred to as s1). ~ s1 expressed as ~ )=[s 1,1 ~ ,s 1,2 ~ ,s 1,3 ~ ,…,s 1,Ns ~ ].
[0088] Next, the initial training data creation unit 110 creates a new set of training data and stores it in the training data storage unit 120 .
[0089] Next, the objective function model creation unit 130 learns an objective function model for this new set of training data (step S25). Note that the learning method in step S25 is the same as the learning method in step S21.
[0090] Next, the annealing unit 30 generates a Hamiltonian to be used in annealing from the obtained objective function model and constraint equation. Then, the annealing unit 30 executes a solution by annealing in a manner similar to the first method shown in the first embodiment. That is, the annealing unit 30 performs annealing on the set of spins s1 that shows the best solution obtained in the first optimization calculation. ~ A solution is then performed using Hamiltonian H to which a constraint equation (for example, the constraint equation shown in the above equation 4) is added, which imposes a penalty when a solution whose distance from is within a predetermined range is selected (step S26). By this solution, a set of spins that minimizes Hamiltonian H is obtained.
[0091] The annealing result determination unit 140 determines whether to continue the optimization cycle (step S27), similar to step S23. If it is determined that the optimization cycle is to be continued, the annealing result determination unit 140 further creates new learning data and adds it to the set of learning data (step S28), similar to step S24.
[0092] The optimization cycle from step S25 to step S28 is repeated a predetermined number of times to complete the second optimization calculation. The set of spins that is the best solution obtained in the second optimization calculation is called s2 ~ =[s 2,1 ~ ,s 2,2 ~ ,s 2,3 ~ ,…,s 2,Ns ~ ].
[0093] Thereafter, the n-th optimization calculation is performed in the same manner as the second optimization calculation. That is, the initial training data creation unit 110 creates a new set of training data and stores it in the training data storage unit 120.
[0094] Next, the objective function model creation unit 130 learns the objective function model with this new set of learning data (step S25). Next, the annealing unit 30 generates a Hamiltonian to be used for annealing from the obtained objective function model and constraint equation. Then, the annealing unit 30 calculates the best solution (s1 ~ ,s2 ~ ,…,s n-1 ~ ) is added to the Hamiltonian to generate a Hamiltonian to be used in annealing, and a solution is then executed (step S26). The solution is then obtained by adding a constraint equation (for example, the constraint equation shown in the above equation 5) that gives a penalty when a solution whose distance from each of the Hamiltonian H is within a predetermined range. n-1 ~ represents the best solution of the n-1th optimization calculation (s n-1 ~ =[s n-1,1 ~ ,s n-1,2 ~ ,s n-1,3 ~ ,…,s n-1,Ns ~ ]).
[0095] The annealing result determination unit 140 determines whether or not to continue the optimization cycle (step S27), similar to step S23. If it is determined that the optimization cycle is to be continued, the annealing result determination unit 140 further creates new learning data and adds it to the set of learning data (step S28), similar to step S24.
[0096] The optimization cycle from step S25 to step S28 is repeated a predetermined number of times to complete the n-th optimization calculation. The set of spins that is the best solution obtained in the n-th optimization calculation is called s n ~=[s n,1 ~ ,s n,2 ~ ,s n,3 ~ ,…,s n,Ns ~ ].
[0097] Then, the annealing result judgment unit 140 judges whether or not to perform the next optimization calculation, and if it is judged that the next optimization calculation is to be performed, the initial learning data creation unit 110 further creates a new set of learning data (step S28). On the other hand, if it is judged that the optimization calculation is not to be continued, the process ends. The optimization calculation result display unit 150 may display, for example, an objective function model as the calculation result. In addition, the optimization calculation result display unit 150 may display a graph showing the convergence status of the objective function.
[0098] 9 is an explanatory diagram showing an example of a graph showing the convergence state of the objective function. First, in the first optimization calculation, a cycle of optimization by machine learning and annealing is repeated to obtain a set of spins s1 corresponding to the best solution. ~ Next, in the second optimization calculation, the process cycle of machine learning and annealing is repeated to obtain the set of spins s2 corresponding to the best solution. ~ The second set of spins obtained is s2. ~ is the set of spins s1 obtained in the first round. ~ , and the cumulative best value of the objective function may increase.
[0099] Furthermore, in the nth optimization calculation, the set of spins s n ~ Considering the optimization calculations from the 1st to the (n-1)th, the cumulative optimal value of the objective function can be increased as a result of the nth optimization calculation. The optimization calculation result display unit 150 may display such a graph. In the above description, s n ~ represents the best solution in the nth optimization calculation, but s n ~may be the solution that appears most frequently in the nth optimization calculation.
[0100] The above describes an example in which the first method in the first embodiment is used as the annealing by the annealing unit 30. The same applies to the case in which the annealing unit 30 uses the second method in the first embodiment. That is, the annealing unit 30 may perform the n-th optimization calculation by annealing in which solutions whose distance from the set of spins showing the best solution already obtained in the past n-1 optimization calculations is within a predetermined range are excluded from the search range during annealing.
[0101] The initial learning data creation unit 110, the objective function model creation unit 130, the constraint equation creation unit 20, the annealing unit 30, the annealing result determination unit 140, and the optimization calculation result display unit 150 are realized by a computer processor that operates according to a program (optimization program).
[0102] Next, a description will be given of the operation of the optimization device 200 of this embodiment. Fig. 10 is a flowchart showing an example of the operation of the optimization device 200 according to the present disclosure.
[0103] The constraint equation generator 120 generates constraint equations for the optimization problem to be solved (step S201).
[0104] The initial learning data creation unit 110, learning data storage unit 120, objective function model creation unit 130, constraint equation creation unit 20, annealing unit 30, annealing result determination unit 140, and optimization calculation result storage unit 160 repeat an optimization cycle consisting of creating (initial) learning data, learning the objective function model, and finding a solution by annealing a predetermined number of times. This is called optimization calculation (step S202).
[0105] The annealing result determination unit 140 determines whether or not to execute the next optimization calculation (step S203). If it is determined that the optimization calculation is to be executed (yes in step S203), the process returns to step 202, and the next optimization calculation is performed. In the annealing in the n-th optimization calculation, a solution is obtained so that spin pairs whose distances to each of the best spin pairs in the optimization calculations up to the n-1th optimization calculation are within a predetermined range are excluded from the search range.
[0106] On the other hand, if it is determined that the optimization calculation is not to be performed (no in step S203), the optimization calculation result display unit 150 displays the results of the optimization calculation up to that point (step S204), and the process ends.
[0107] Next, a specific process of the optimization calculation will be described. Fig. 11 is a flow chart showing an example of the operation of the first optimization calculation. The initial learning data creation unit 110 creates initial learning data consisting of pairs of spin values and objective function values (step S311). In addition, the objective function model creation unit 130 creates an objective function model represented by a spin polynomial by machine learning using the learning data (step S313).
[0108] The annealing unit 30 creates a Hamiltonian by combining the objective function model and the constraint equations that express the constraint conditions of the optimization problem to be solved created in step S201 as spin polynomials, and solves the spin value that minimizes this by annealing (step S314). The annealing result judgment unit 140 judges whether the value obtained by applying the spin value obtained by annealing to the black box function is a desired value or not (step S315). If it is a desired value (yes in step S315), the optimization calculation result display unit 150 displays the optimization calculation result (step S316), and the entire optimization calculation is terminated.
[0109] On the other hand, if it is not the desired value (no in step S315), the annealing result judgment unit 140 judges whether the number of iterations (more specifically, the number of processes from steps S313 to S315 and step S318, which is the number of optimization cycles) is a predetermined number (step S317). If it is the predetermined number (yes in step S317), the first optimization calculation is terminated and a second optimization calculation is performed.
[0110] On the other hand, if the number of times is not the predetermined number (no in step S317), the annealing unit 30 adds a pair of the spin value obtained in steps S314 and S315 and the value obtained by applying this spin value to the black-box function to the learning data, and updates the learning data (step S318). After that, the processes from step S313 onwards are repeated.
[0111] Next, specific processing of the second and subsequent (n-th) optimization calculations will be described. FIG. 12 is a flowchart showing an example of the operation of the n-th optimization calculation. The flowchart shown in FIG. 12 shows an example of the operation of a method for solving the problem by the first method in the first embodiment. The processing for creating initial learning data is similar to the processing in step S311 shown in FIG. 11.
[0112] The constraint equation creating unit 20 creates a constraint equation that prevents the selection of a spin pair whose distance from each of the spin pairs showing the optimal solution obtained in the optimization calculation up to the n-1th time from being within a predetermined range (step S321). After that, the solution is found by annealing, and the process until the optimization calculation is completed is the same as the process from step S313 to step S318 in FIG.
[0113] Here, in step S317, if the number of times is the predetermined number (yes in step S317), the annealing result judgment unit 140 further judges whether the number of optimization calculations is a predetermined value or not (step S322). If the number of times is the predetermined number (yes in step S322), the optimization calculation result display unit 150 displays the optimization calculation result and ends the entire optimization calculation (step S323). On the other hand, if the number of times is not the predetermined number (no in step S322), the nth optimization calculation is ended and the n+1th optimization calculation is performed.
[0114] Fig. 13 is a flowchart showing another operation example of the n-th optimization calculation. The flowchart shown in Fig. 13 shows an operation example of a method for solving the problem by the second method in the first embodiment. The process from creating initial learning data to creating an objective function model is similar to the process in steps S311 and S313 shown in Fig. 11.
[0115] The annealing unit 30 creates a Hamiltonian by combining the objective function model and the constraint equation. The annealing unit 30 then finds the spin value that minimizes this by annealing, excluding from the search targets spin pairs whose distances from each of the spin pairs showing the optimal solutions obtained in the optimization calculations up to the n-1th time within a predetermined range (step S331). The subsequent processing up to displaying the optimization result is the same as the processing from step S315 onwards illustrated in FIG. 12.
[0116] In this example, the possibility that the desired solution will not be obtained is suppressed by preventing the best solution in the optimization calculations up to the n-1th time from being selected in the annealing in the nth optimization calculation. However, a similar operation may be performed in the optimization cycle in each optimization calculation. That is, the operation is to prevent the possibility that the desired solution will not be obtained by preventing the solution in the optimization cycles up to the n-1th time from being selected in the annealing in the nth optimization cycle.
[0117] As described above, in this embodiment, the objective function model creation unit 130 learns the objective function model expressed by a spin polynomial by machine learning, and the annealing unit 30 executes a solution by annealing using an objective function including the objective function model. Therefore, it is possible to suppress the possibility that a desired solution cannot be obtained due to bias in the learning data in black box optimization, and it is possible to obtain a more preferable solution.
[0118] Next, an overview of the present disclosure will be described. Fig. 14 is a block diagram showing an overview of an optimization device according to the present disclosure. An optimization device 80 according to the present disclosure is an optimization device (e.g., optimization device 100) that solves a combinatorial optimization problem by annealing, and includes annealing means 81 (e.g., annealing unit 30) that executes solution-finding by annealing multiple times.
[0119] The annealing means 81 performs the solution search in such a way that, in the nth (specifically, n≧2) time of solution search, the spin pairs whose distances (e.g., Hamming distance, Euclidean distance, etc.) from the spin pair showing the optimal solution obtained in the n-1th time solutions are within a predetermined range are excluded from the search range.
[0120] With such a configuration, it is possible to obtain a stepwise optimal solution in optimization using annealing.
[0121] Furthermore, the optimization device 80 may include an output means (for example, the solution-finding result display unit 50) that outputs optimal solutions obtained by multiple solution-finding operations in the order in which the optimal solutions are obtained.
[0122] In addition, the annealing means 81 may perform the nth solution by using a Hamiltonian to which a constraint equation is added that imposes a penalty when a solution is selected whose distance from a set of spins indicating an optimal solution already obtained in the past n-1th solution is within a predetermined range (for example, by the first method described above).
[0123] 15 is a block diagram showing another overview of an optimization device according to the present disclosure. The optimization device 90 according to the present disclosure is an optimization device (e.g., optimization device 200) that solves a combinatorial optimization problem by annealing, and includes an annealing means 91 (e.g., annealing unit 30) that executes a solution by annealing multiple times, and a learning means 92 (e.g., objective function model creation unit 130) that learns an objective function model expressed by a polynomial of spins by machine learning using learning data in which a set of spins is used as an explanatory variable and a value obtained by applying the set of spins to a black-box function representing a black-box optimization problem is used as an objective variable.
[0124] The annealing means 91 performs a solution by annealing using a Hamiltonian including an objective function model, and performs optimization calculations multiple times in which learning of the objective function model and solution by annealing are repeated. In addition, the annealing means 91 performs solution by annealing so as to exclude from the search range, in the n-th optimization calculation, a spin pair whose distance from the spin pair showing the best solution obtained in the optimization calculations up to the n-1th optimization calculation is within a predetermined range.
[0125] With such a configuration, it is possible to reduce the possibility that a desired solution cannot be obtained in black-box optimization due to bias in the training data, etc., and it is possible to obtain a more preferable solution.
[0126] Furthermore, the learning means 92 may create new learning data by applying the solution obtained by the solution-finding through annealing to the black-box function, and learn the objective function model by machine learning using the generated learning data.
[0127] In addition, the annealing means 91 may perform solution-finding using a Hamiltonian to which a constraint equation is added that imposes a penalty when a solution is selected in the nth optimization calculation whose distance from the spin pair indicating the best solution obtained in the n-1th optimization calculation is within a predetermined range.
[0128] 16 is a schematic block diagram showing a configuration of a computer according to at least one embodiment. The computer 1000 includes a processor 1001, a main storage device 1002, an auxiliary storage device 1003, and an interface 1004. In addition, the computer 1000 may be connected to a computer that executes a mathematical programming solver, an annealing machine, a simulator, or the like.
[0129] The optimization device 80 described above is implemented in a computer 1000. The operations of the above-mentioned processing units are stored in the form of a program (optimization program) in an auxiliary storage device 1003. The processor 1001 reads the program from the auxiliary storage device 1003, loads it in the main storage device 1002, and executes the above-mentioned processing in accordance with the program.
[0130] In at least one embodiment, the auxiliary storage device 1003 is an example of a non-transitory tangible medium. Other examples of non-transitory tangible media include a magnetic disk, a magneto-optical disk, a CD-ROM (Compact Disc Read-only memory), a DVD-ROM (Read-only memory), and a semiconductor memory connected via the interface 1004. In addition, when this program is distributed to the computer 1000 via a communication line, the computer 1000 that receives the program may load the program into the main storage device 1002 and execute the above-mentioned process.
[0131] The program may be for realizing part of the above-mentioned functions. Furthermore, the program may be a so-called differential file (differential program) that realizes the above-mentioned functions in combination with another program already stored in the auxiliary storage device 1003.
[0132] Although the present disclosure has been described above with reference to the embodiments, the present disclosure is not limited to the above-mentioned embodiments. Various modifications that can be understood by a person skilled in the art can be made to the configuration and details of the present disclosure within the scope of the present disclosure. Furthermore, each embodiment can be appropriately combined with other embodiments. [Explanation of symbols]
[0133] 10 Objective function creation section 20 Constraint Expression Creation Section 30 Annealing Department 40 Solution result storage section 50 Solution result display section 80,90 Optimizer 81,91 Annealing means 92 Learning Methods 100,200 Optimizer 110 Initial learning data creation department 120 Learning data storage unit 130 Objective function model creation section 140 Annealing result judgment unit 150 Optimization calculation result display section 160 Optimization calculation result storage unit 1000 Computers 1001 Processor 1002 Main storage 1003 Auxiliary storage device 1004 Interface
Claims
1. An optimization device that solves a combinatorial optimization problem by annealing, comprising: An annealing means for executing a solution by annealing multiple times, The annealing means executes the solution search so as to exclude from the search range, in the n-th solution search, a set of spins whose distance from the set of spins showing the optimum solution obtained in the n-1th solution search is within a predetermined range. Optimization device characterized by:
2. The system is provided with an output unit for outputting the optimal solutions obtained by multiple solution attempts in the order in which the optimal solutions were obtained. The optimization device according to claim 1 .
3. The annealing means executes the nth solution by using a Hamiltonian to which a constraint equation is added that imposes a penalty when a solution is selected whose distance from a set of spins showing an optimal solution already obtained in the past n-1th solution is within a predetermined range.
3. The optimization device according to claim 1 or 2.
4. An optimization device that solves a combinatorial optimization problem by annealing, comprising: annealing means for performing a solution-finding process by annealing multiple times; a learning means for learning an objective function model expressed by a polynomial of spins by machine learning using learning data in which a set of spins is an explanatory variable and a value obtained by applying the set of spins to a black-box function representing a black-box optimization problem is an objective variable; The annealing means executes the solution-finding by the annealing using a Hamiltonian including the objective function model, and performs an optimization calculation multiple times in which the learning of the objective function model and the solution-finding by the annealing are repeated; The annealing means performs the solution search by the annealing in such a way that, in the n-th optimization calculation, a spin pair whose distance from the spin pair showing the best solution obtained in the optimization calculations up to the n-1th calculation is within a predetermined range is excluded from a search range. Optimization device characterized by:
5. The learning means applies the solution obtained by the solution-finding by annealing to the black-box function to generate new learning data, and learns the objective function model by machine learning using the generated learning data.
5. The optimization device according to claim 4.
6. The annealing means executes a solution search using a Hamiltonian to which a constraint equation is added that imposes a penalty when a solution is selected in the nth optimization calculation whose distance from the set of spins showing the best solution obtained in the n-1th optimization calculation is within a predetermined range.
6. The optimization device according to claim 4 or 5.
7. An optimization method for solving a combinatorial optimization problem by annealing, comprising the steps of: Run the annealing solution multiple times, During the annealing, the solution is found so that in the n-th solution, a set of spins whose distance from the set of spins showing the optimal solution obtained in the n-1th solution is within a predetermined range is excluded from the search range. Optimization method according to claim 1,
8. An optimization method for solving a combinatorial optimization problem by annealing, comprising the steps of: A machine learning method is used to learn an objective function model expressed by a polynomial of spins by using learning data in which a pair of spins is used as an explanatory variable and a value obtained by applying the pair of spins to a black-box function representing a black-box optimization problem is used as an objective variable; Executing a solution by annealing using an objective function including the objective function model; performing an optimization calculation multiple times in which the learning of the target engine model and the solution by the annealing are repeated; In the n-th optimization calculation, the solution is found by annealing so as to exclude from the search range any spin pair whose distance from the spin pair showing the best solution obtained in the optimization calculations up to the n-1th optimization calculation is within a predetermined range. Optimization method according to claim 1,
9. An optimization program applied to a computer that solves combinatorial optimization problems by annealing, The computer includes: Execute an annealing process to find a solution by annealing multiple times; In the annealing process, the solution is found so that in the n-th solution, a set of spins whose distance from the set of spins showing the optimal solution obtained in the n-1th solution is within a predetermined range is excluded from the search range. Optimization program for.
10. An optimization program applied to a computer that solves combinatorial optimization problems by annealing, The computer includes: An annealing process in which the solution is found by annealing multiple times; and executing a learning process for learning an objective function model expressed by a polynomial of spins by machine learning using learning data in which the pair of spins is an explanatory variable and a value obtained by applying the pair of spins to a black-box function representing a black-box optimization problem is an objective variable; In the annealing process, a solution is found by the annealing using an objective function including the objective function model, and an optimization calculation is performed multiple times in which learning of the objective function model and the solution is found by the annealing are repeated; In the annealing process, a solution is found by annealing in such a way that in the n-th optimization calculation, a set of spins whose distance from the set of spins showing the best solution obtained in the optimization calculations up to the n-1th optimization calculation is within a predetermined range is excluded from a search range. Optimization program for.
Citation Information
Patent Citations
Information processor, regression model generation method, and regression model generation program
JP2022003484A