The present application claims priority from Japanese application JP 2021-186554, filed on Nov. 16, 2021, the contents of which is hereby incorporated by reference into this application.
The present invention relates to an optimization method, an information processing device, and an information processing system.
In Patent Document (WO2019216277A1), it describes a method for efficiently performing unconstrained binary quadratic optimization based on simulated annealing by converting the interaction relation of the Ising model having a quadratic energy function into a complete bipartite graph structure.
Non-Patent Document (F. Glover, G. Kochenberger, and Y. Du, “A Tutorial on Formulating and Using QUBO Models”, preprint (arXiv:1811.11538).) describes a method for converting various combinatorial optimization problems into binary quadratic optimization problems.
Many physical and social phenomena can be expressed by interaction models. The interaction model is defined by a plurality of nodes constituting the model, an interaction between the nodes, and a bias for each node. Various models have been proposed in the fields of physics and social science, and many of them can be interpreted as a form of interaction model.
As a typical example of the interaction models, there is the Ising model or a binary quadratic model equivalent thereto (hereinafter referred to as BQM). BQM has a binary value such as 0/1 for each node, and has an energy function expressed by a quadratic expression based on the interaction between the nodes and the bias for each node. The search for the lowest energy state (called the ground state) of BQM is equivalent to an unconstrained binary quadratic optimization problem. As a method for searching this ground state, there is a Markov chain Monte Carlo method. The Markov chain Monte Carlo method is a calculation method for estimating a desired statistic by sampling states of variables while probabilistically updating the state.
Many of the actual combinatorial optimization problems have not only an evaluation function that indicates the quality of the solution, but also constraints that the solution must satisfy. When the combinatorial optimization problem is converted into a binary quadratic optimization problem, such a constraint becomes a constraint imposed between the nodes. In order to search for a solution while satisfying the constraint, for example, state update may be executed between the states satisfying the constraint according to the Markov chain Monte Carlo method. However, it is difficult to solve a large-scale optimization problem within a practical time because it takes time to sequentially process such state updates.
The present invention has been invented in view of such a background, and it is a purpose of the present invention to provide an optimization method, an information processing device, and an information processing system capable of efficiently performing constrained binary quadratic optimization.
According to a first aspect of the invention, there is provided an optimization method. Thus, the optimization method is a method using an information processing device that executes a ground state search. The optimization method converts a binary quadratic model with constraints into a complete bipartite graph that has an interaction relationship and a coupling that makes the same values in the ground state between the i-th variable pair of the first variable group and the second variable group. The method, in each variable group, divides the variables into groups that can be updated under satisfying the constraints, and performs state updates for each group in parallel.
According to a second aspect of the invention, there is provided an information processing device. Thus, the information processing device includes an arithmetic unit that updates variables in a variable group of the complete bipartite graph with constraints. The arithmetic unit includes an interaction coefficient memory, a bias coefficient memory, a first variable memory, a second variable memory, and a signal SW supply line. The interaction coefficient memory stores interaction matrix J, which summarizes the interaction coefficients showing the interactions acting between the first variable group and the second variable group, and coupling A that makes the same values in the ground state between the i-th variable pair of the first variable group and the second variable group. The bias coefficient memory stores the bias coefficient h indicating the bias acting on the variable. The first variable memory stores the variables of the first variable group. The second variable memory stores the variables of the second variable group. The signal SW supply line supplies a selection signal SW for selecting the first variable group or the second variable group. And, the arithmetic unit, when the selection signal SW selects the d-th variable group (d=1, 2), calculates the next state for each group of variables summarized by the constraints, the value of the variable read from the memory storing the corresponding variable group, the value of the interaction coefficient in the interaction matrix J corresponding to the variable, the value of the coupling λ, and the value of the bias coefficient h are used as inputs.
According to a third aspect of the invention, there is provided an information processing system. Thus, the information processing system is a system that searches for the ground state. The information processing system includes a user terminal and an arithmetic unit. The user terminal is used for inputting information by the user. The arithmetic unit updates the variables of the variable group of the complete bipartite graph having constraints, and is arranged on a cloud different from the user terminal. The arithmetic unit includes an interaction coefficient memory, a bias coefficient memory, a first variable memory, a second variable memory, and a signal SW supply line. The interaction coefficient memory stores interaction matrix J, which summarizes the interaction coefficients showing the interactions acting between the first variable group and the second variable group, and coupling A that makes the same values in the ground state between the i-th variable pair of the first variable group and the second variable group. The bias coefficient memory stores the bias coefficient h indicating the bias acting on the variable. The first variable memory stores the variables of the first variable group. The second variable memory stores the variables of the second variable group. The signal SW supply line supplies a selection signal SW for selecting the first variable group or the second variable group. And, the arithmetic unit, when the selection signal SW selects the d-th variable group (d=1, 2), calculates the next state for each group of variables summarized by the constraints, the value of the variable read from the memory storing the corresponding variable group, the value of the interaction coefficient in the interaction matrix J corresponding to the variable, the value of the coupling λ, and the value of the bias coefficient h are used as inputs.
According to the present invention, it is possible to efficiently solve a constrained binary quadratic optimization problem. Purposes, configurations, and effects other than the above will be clarified by the following description of embodiments for performing the invention.
Hereinafter, embodiments will be described in detail with reference to the drawings. In addition, in the following description, the same or similar configurations may be designated by a common reference numeral and duplicated description may be omitted. Further, when there are a plurality of elements having the same or similar functions, different subscripts may be added to the same reference numeral to explain. If it is not necessary to distinguish between multiple elements, the subscript may be omitted and explained.
First, BQM will be described. BQM is defined by a plurality of nodes constituting the model, the interaction relationship between the nodes, and the bias of each node. It is assumed that the variable xi corresponding to each node i (i=1 to N) is x¬i∈{0,1}. The energy function H (x) (called the Hamiltonian) is defined based on the BQM interaction relationship and bias. An example of this energy function H (x) is shown below.
Here, J is a real symmetric matrix with N rows and N columns, and h is an N-dimensional vector. The first term on the right side of expression 1 expresses the interaction relationship, and the second term on the right side expresses the energy function based on the bias. In general, BQM can be expressed as an undirected graph, and the interaction acting between variable pairs in the interaction term is expressed as the edge of the graph. Therefore, Jij in expression 1 does not change the value by the replacement of index. Also, since x2i=xi, the diagonal element of Jij can be set to 0 by substituting the bias term.
The binary quadratic optimization problem is an optimization problem for finding a variable array {xi} that minimizes the energy function. In this embodiment, the search for the ground state of the interaction model is performed by the Markov Chain Monte Carlo methods (hereinafter referred to as MCMC).
In the heat bath method, the state update to the update candidate n is executed with the following probability r, as En is the energy of the update candidate n, and parameter T for controlling the state update. The following is an example of the formula used in the heat bath method.
NUMERICAL EXPRESSION
r=e
−E
/T/Σne−E
In the metropolis method, the state update to the update candidate is executed with the following probability r, as Δ E is the energy difference between the state of the update candidate and the current state. The following is an example of the formula used in the Metropolis method.
NUMERICAL EXPRESSION 3
r=min{1,exp(−ΔE/T)} (EXPRESSION 3)
When updating the current state x=(x1, . . . , XN), it is common method to update each variable xi one by one from i=1 to N. By changing the variables one by one, the search is executed for the states that the entire variable can take. For example, in the case of
Here, for example, by gradually changing the value of T in expression 2 from a large value to a small value, MCMC is executed while suppressing state update, and the energy gradually converges to the lowest state. Simulated annealing (hereinafter referred to as SA) is a method for finding the optimum solution of a minimization problem using this. Corresponding to the actual annealing, the parameter T is called the temperature parameter.
When MCMC or SA is applied to BQM, the value of the variable is stochastically updated according to the probability based on the energy function of expression 2 or expression 3. Here, the variables having no interaction relation or constraint relation become independent in the energy function, and the state update based on the expression 2 or the expression 3 can be applied at the same time. Therefore, by updating independent variables in parallel, it is possible to speedup the processing of MCMC and SA.
However, as described in Non-Patent Document, many combinatorial optimization problems can be reduced to binary quadratic optimization problems, but they also have constraints that the solution must satisfy. Due to the influence of the constraints, for example, in
As a means for dealing with the constraint condition, as described in Non-Patent Document 1, the constraint relationship in BQM may be considered to a method using a penalty function method or a Lagrange function (extended Lagrange method, etc.). In these methods, a ground state that satisfies the constraint condition is constructed by adding a penalty function or a Lagrange function corresponding to the constraint condition to the objective function. However, in these methods, the influence of the penalty function etc. is determined by the magnitude of the coefficient, if it is too large, the influence of the original objective function will be small and it will be difficult to find a good solution, and if it is too small, the constraint relationship will not be satisfied, so careful adjustment of the coefficients was necessary. Further, since it is necessary to repeatedly execute SA for adjustment, it is also a problem that the effective processing time increases.
If a plurality of spins can be updated at the same time while satisfying the theoretical background required by MCMC in consideration of the interaction relationship and the constraint relationship, it is possible to speed up the processing of MCMC and SA. In fact, Patent Document 1 proposes a method for efficiently obtaining the ground state by converting the interaction relationship into a complete bipartite graph structure, for BQM (equivalent Ising model) having no constraint condition.
In view of this background, in this embodiment, for a constrained binary quadratic optimization problem, a method of efficiently performing an optimum solution search by SA that executes state updates in parallel while satisfying the constraint relationship without using a penalty function or a Lagrange function will be described.
The constrained binary quadratic optimization problem targeted by the embodiment is a problem of minimizing the BQM of the expression 1 within the range satisfying the following linear equality constraints.
Here, in expression 4, A is an M×N matrix and b is an M-dimensional vector. Corresponding to expression 4, the following problem is defined.
The third term on the right side of expression 5 acts as an interaction such that the values of the i-th (i=1 to N) pairs of the first and second variable groups are aligned. When the coupling λ>0 is set to a sufficiently large value, the optimum solution of expression 5 exists in the range of x=y, therefor, this is consistent with the optimal solution of expression 4, which is the original problem. In fact, it is possible to show sufficient conditions for the coupling A for the optimum solutions of expressions 4 and 5 to match. One of them is that the following expression 6 holds for any μ>0.
NUMERICAL EXPRESSION 6
λ>−λmin(J+μAT(I−b⊗bT/∥b∥2)A) (EXPRESSION 6)
Here, in expression 6, λmin (W) indicates the minimum eigenvalue of the real symmetric matrix W.
Here, the solution search of the expression 4 can be executed by setting an appropriate coupling λ and performing the solution search of the expression 5. Since expression 5 has the interaction relationship of the complete bipartite graph structure shown in
The update that satisfies the constraint relations shown in
The k-hot constraint is a constraint that imposes that k variables take 1 and other variables take 0 in the variable group. When the number of variables included in the variable group ism, this constraint condition is expressed by expression 7.
NUMERICAL EXPRESSION 7
Σi=1mxi=k EXPRESSION 7
There are m Ck state candidates that satisfy this constraint. For example,
The matrix type constraint imposes a 1-hot constraint on each of the indexes i and j of the variable xij. This constraint is expressed by expression 8.
NUMERICAL EXPRESSION 8
∀i,Σjxij=1 and ∀j,Σjxij=1 (EXPRESSION 8)
Here, an example of a variable group that can be updated with the constraints satisfied for the k-hot constraint and the matrix type constraint and the update method thereof is shown. However, other update methods can be adopted as long as they meet the requirements of MCMC. Also, for other constraints, the same procedure can be applied by dividing them into variable groups in the same way.
Subsequently, an embodiment of an information processing device that executes state updates in parallel while satisfying the above-mentioned constraint relations will be shown. The information processing device 10 shown in
The processor 11 is configured by using, for example, a CPU (Central Processing Unit) or an MPU (Micro Processing Unit). The main storage device 12 is a device that stores programs and data, and is, for example, ROM (Read Only Memory), SRAM (Static Random Access Memory), NVRAM (Non Volatile RAM) mask ROM (Mask Read Only Memory), PROM (Programmable ROM), etc., RAM (Random Access Memory), DRAM (Dynamic Random Access Memory), and the like. The auxiliary storage device 13 is a hard disk drive (Hard Disk Drive), a flash memory (Flash Memory), an SSD (Solid State Drive), an optical storage device (CD (Compact Disc), DVD (Digital Versatile Disc)), or the like. The programs and data stored in the auxiliary storage device 13 are read into the main storage device 12 at any time.
The input device 14 is a user interface that receives information input from the user, and is, for example, a keyboard, a mouse, a card reader, a touch panel, or the like. The output device 15 is a user interface that provides information to the user, and is, for example, a display device (LCD (Liquid Crystal Display)) or the like that visualizes various information, an audio output device (speaker), a printing device, or the like. Further, regarding the display, for example, a graphic card may be provided. The communication device 16 is a communication interface for communicating with other devices, and is, for example, an NIC (Network Interface Card), a wireless communication module, a USB (Universal Serial Interface) module, a serial communication module, and the like.
The arithmetic unit 20 is a device that executes a ground state search. The arithmetic unit 20 may take the form of an expansion card to be mounted on the information processing unit 10, such as a GPU (Graphics Processing Unit). The arithmetic unit 20 is composed of hardware such as, for example, a CMOS (Complementary Metal Oxide Semiconductor) circuit, an FPGA (Field Programmable Gate Array), an ASIC (Application Specific Integrated Circuit), or the like. The arithmetic unit 20 includes a control device, a storage device, an interface for connecting to the system bus 5, and sends/receives commands and information to/from the processor 11 via the system bus 5. The arithmetic unit 20 may be connected to the other arithmetic unit 20 so as to be communicable via a communication line, and may operate in cooperation with the other arithmetic unit 20. The function realized by the arithmetic unit 20 may be realized, for example, by causing a processor (CPU, GPU, etc.) to execute a program.
As shown in the figure, the arithmetic circuit 700 includes an interaction coefficient memory 711, a bias coefficient memory 712, a d-variable memory 713.d (d=1,2), a product-sum arithmetic unit 714, and a comparison arithmetic unit 715.
The interaction coefficient memory 711 stores information representing the interaction matrix J and the coupling λ. As described above, since the interaction matrix is a real symmetric matrix, the amount of memory 711 used can be reduced by using this symmetry.
The bias coefficient memory 712 stores information on the vector h that defines the bias term.
The d-variable memory 713.d (d=1,2) stores information of an N-dimensional vector indicating the state of the d-variable group of the complete bipartite graph structure described above.
Signals SW, SR, and ST are input to the arithmetic circuit 700. The mathematical function arithmetic unit (comparison arithmetic unit 715 in
The signal SW is a signal that periodically repeats integers 1 and 2, and specifies a variable memory 713.d (d=1,2) to be updated. The signal SW is supplied via the signal SW supply line of the arithmetic unit 20.
The signal ST inputs the temperature parameter T in the expression 2 and the expression 3. The signal ST is supplied via the signal ST supply line of the arithmetic unit 20.
The signal SR is a signal that gives a uniform random number of 0 to 1. It is used to determine the update in expression 2 and expression 3. The signal SR is supplied via the signal SR supply line of the arithmetic unit 20.
As described above, the coupling λ is set as a sufficiently large value based on the interaction matrix J, the matrix A that defines the constraint conditions, and the vector b. The numerical evaluation based on the expression 6 may be performed outside the arithmetic unit 20, for example, the processor 11. In addition, calculation can be performed in the arithmetic unit 20. For example, when the maximum eigenvalue is calculated by the exponentiation method or the like, this calculation repeatedly executes a matrix-vector product, and the product-sum arithmetic unit 714 can be utilized.
Data from the interaction coefficient memory 711, the bias coefficient memory 712, the d-variable memory 713.d (d=1,2), and the signal SW are input to the product-sum arithmetic unit 714. The energy for updating the state of the d-variable group is calculated and output by performing the product-sum operation of expression 5.
In expressions 2 and 3, probabilistic processing based on the energy value is required, and the comparison arithmetic unit 715 executes this portion. The variable group to be updated is specified by the signal SW. Further, the temperature parameter T included in the expression 2 and the expression 3 is input from the signal ST. Based on the value of the uniform random number input from the signal SR, the selection of the next state in the expression 2 or the acceptance/rejection of the next state in the expression 3 is determined. The value of the variable, which is the output value, is output to the signal SP.
The arithmetic of the arithmetic circuit 700 can be executed independently, for each group that can execute state update that satisfies the constraint conditions as shown in
Among the above functions, the storage unit 800 stores the BQM format problem data 801 and the arithmetic unit control program 802 in the main storage device 12 or the auxiliary storage device 13. The BQM format problem data 801 is data in which a combinatorial optimization problem is input in a predetermined description format. That is, it is related to the data of the interaction matrix J of the expression 4 which is the problem to be solved, the vector h of the bias coefficient, and the matrices A and the vector b which define the constraint conditions. The BQM format problem data 801 is set by the user, for example, via a user interface (input device, output device, communication device, etc.). The arithmetic unit control program 802 is a program that is executed when the energy arithmetic execution unit 815 controls the arithmetic unit 20, or is a program that loads the energy arithmetic execution unit 815 into individual arithmetic units 20 and causes the arithmetic unit 20 to execute processing.
The model coefficient setting unit 811 sets the interaction matrix J in the interaction coefficient memory 711 and the vector h in the bias coefficient memory 712 based on the BQM format problem data 801.
The coupling strength calculation unit 812 calculates the value of the coupling Ain the expression 5 from the BQM format problem data 801 based on the expression 6 and sets it in the interaction coefficient memory 711.
The variable value initialization unit 813 initializes the value stored in the variable memory 713.d (d=1,2) of the arithmetic unit 20 to an appropriate value satisfying the constraint condition.
The temperature parameter control unit 814 controls the temperature parameter T in the expressions 2 and 3.
The interaction calculation execution unit (energy calculation execution unit 815) performs a ground state search by SA using the value of the energy function according to expressions 2 and 3.
The variable value reading unit 816 reads the value stored in the variable memory 713.d (d=1,2) when SA is executed by the energy calculation executing unit 815. Then, the variable value reading unit 816 ends the ground state search by outputting the read value to the output device 15 and the communication device 16.
First, the model coefficient setting unit 811 sets values in the interaction coefficient memory 711 and the bias coefficient memory 712 from the BQM format problem data 801 of the storage unit 800 (S911). Note that, the user can also set or edit the value of the memory via the user interface (for example, realized by the input device 14, the output device 15, the communication device 16, etc.).
Subsequently, the coupling strength calculation unit 812 sets the coupling λ from the expression 6 based on the values of the interaction matrix J stored in the BQM format problem data 801 of the storage unit 800, the matrix A defining the constraint conditions, and the vector b, and stores the coupling λ in the interaction coefficient memory 711. As described above, this calculation may be performed in the arithmetic unit 20 or in the processor 11 (S912).
Subsequently, the variable value initialization unit 813 initializes the value stored in the variable memory 713.d (d=1,2) (S913).
Subsequently, the energy calculation execution unit 815 updates the value of the variable memory 713.d (d=1,2) by executing the SA based on the value of the energy function according to the expressions 2 and 3 (S914).
Subsequently, the energy calculation execution unit 815 (interaction calculation execution unit) determines whether or not the SA end condition is satisfied (for example, whether or not the state update is executed while changing the temperature parameter T a predetermined number of times) (S915). When the interaction calculation execution unit 815 determines that the SA end condition is satisfied (S915: YES), the process proceeds to S916. On the other hand, when the interaction calculation execution unit 815 determines that the stop condition is not satisfied (S915: NO), the process returns to S914.
Subsequently, the variable value reading unit 817 reads the value stored in the variable memory 713.d (d=1,2) and stores it as the result of the ground state search (S916), and the ground state search process S900 ends.
An example of the configuration of
As described with reference to
The SRAM interface 1004 has a configuration described later, and writes to and reads from the variable memory 1101 that stores the variables of the unit 1001 created by applying the circuit configuration of the SRAM. The value of the variable read after the processing in the arithmetic circuit 700 is completed is sent to the variable value reading unit 816. The variable value reading unit 816 outputs the result of the ground state search by appropriately storing and outputting the read value.
The controller 1005 initializes the arithmetic circuit 700 and inform the end of processing according to the instruction of the energy arithmetic execution unit 815.
The value of the current variable is input to the product-sum arithmetic unit 714. These variables are generated by the SRAM interface 1004 reading from the variable memory 1101 of the other unit 1001. Further, the values stored in the interaction coefficient memory 711 and the bias coefficient memory 712 are input.
The output of the product-sum arithmetic unit 714, the signal ST, and the signal SR are input to the comparison arithmetic unit 715. Then, the next state of the variable group is output based on the expressions 2 and 3, and stored in the variable memory 1101.
As described in detail above, according to the information processing device 10 of the present embodiment, it is possible to efficiently search for the ground state of the constrained BQM, by dividing the variables into groups that can update the state that satisfies the constraints and parallelizing the updates of each group. Further, as described above, the ground state search based on SA can be efficiently executed. Since the information processing device 10 (including the arithmetic unit 20) has a simple structure, it can be manufactured inexpensively and easily. The information processing device 10 can be used in various fields, and as an example, it is also possible to contribute to economic efficiency and energy saving by finding the optimum solution of the objective function set from the viewpoint of economic efficiency and energy saving.
Although one embodiment has been described in detail above, it is needless to say that the present invention is not limited to the above embodiment and can be variously modified without departing from the gist thereof. For example, the above-described embodiment has been described in detail in order to explain the present invention in an easy-to-understand manner, and is not necessarily limited to the including all the described configurations. Further, it is possible to add/delete/replace another configuration to a part of the configuration of the above embodiment.
Further, with respect to each of the above configurations, functional units, processing units, processing means and the like, some or all of them may be realized by hardware, for example, by designing with an integrated circuit. Further, each of the above configurations, functions, and the like may be realized by software by the processor interpreting and executing a program that realizes each function. Data such as programs, tables, and files that realize each function can be placed in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card, a SD card, or a DVD.
Further, in each of the above figures, the control lines and data lines are shown as necessary for explanation, and do not necessarily show all the control lines and data lines in the implementation. For example, in practice, it may be considered that almost all configurations are interconnected.
Further, regarding the information processing device 10 described above, the various functional units, the various processing units, and the arrangement form of the various databases are only an example. The various functional units, the various processing units, and the arrangement form of the various databases can be changed to the optimum arrangement form from the viewpoint of the performance, processing efficiency, communication efficiency, and the like of the hardware and software included in the information processing device 10.
Further, the configuration of the database (schema etc.) for storing various data described above can be flexibly changed from the viewpoints of efficient use of resources, improvement of processing efficiency, improvement of access efficiency, improvement of search efficiency, and the like.
As described above, the part of the information processing device 10 having an arithmetic function may be arranged on the cloud, and an information processing system including a user terminal having a user interface function such as an input device and an arithmetic unit 20 arranged on the cloud may be provided. In this information processing system, the arithmetic unit 20 is configured to be able to communicate with the outside such as a user terminal via an appropriate interface. Then, the user can set or edit the BQM format problem data 801 (that is, values related to the interaction coefficient, bias, etc., constraints, etc.) via the user terminal. Further, the data and the processing result used in the processing of the arithmetic unit 20 may be stored in the arithmetic unit 20 or may be stored outside the arithmetic unit 20.
It can be used for optimization methods, information processing devices, and information processing systems.
Number | Date | Country | Kind |
---|---|---|---|
2021-186554 | Nov 2021 | JP | national |